зеркало из https://github.com/microsoft/clang-1.git
If we don't have a complete type for the array type yet either then
just let the alignment be zero. PR13531 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161379 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
97d0293059
Коммит
c7fb748061
|
@ -1468,7 +1468,10 @@ llvm::DIType CGDebugInfo::CreateType(const ArrayType *Ty,
|
|||
CGM.getContext().getTypeAlign(CGM.getContext().getBaseElementType(VAT));
|
||||
} else if (Ty->isIncompleteArrayType()) {
|
||||
Size = 0;
|
||||
Align = CGM.getContext().getTypeAlign(Ty->getElementType());
|
||||
if (Ty->getElementType()->isIncompleteType())
|
||||
Align = 0;
|
||||
else
|
||||
Align = CGM.getContext().getTypeAlign(Ty->getElementType());
|
||||
} else if (Ty->isDependentSizedArrayType() || Ty->isIncompleteType()) {
|
||||
Size = 0;
|
||||
Align = 0;
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
// RUN: %clang -emit-llvm -g -S %s -o -
|
||||
// PR13531
|
||||
template <typename>
|
||||
struct unique_ptr {
|
||||
unique_ptr() {}
|
||||
};
|
||||
|
||||
template <unsigned>
|
||||
struct Vertex {};
|
||||
|
||||
void crash() // Asserts
|
||||
{
|
||||
unique_ptr<Vertex<2>[]> v = unique_ptr<Vertex<2>[]>();
|
||||
}
|
Загрузка…
Ссылка в новой задаче