Properly handle instantiation-dependent array bounds.
We previously failed to treat an array with an instantiation-dependent
but not value-dependent bound as being an instantiation-dependent type.
We now track the array bound expression as part of a constant array type
if it's an instantiation-dependent expression.
llvm-svn: 373685
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 30d8b1d..ffb8d4b 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -2180,7 +2180,7 @@
} else {
return CompilerType(this, ast->getConstantArrayType(
ClangUtil::GetQualType(element_type),
- ap_element_count,
+ ap_element_count, nullptr,
clang::ArrayType::Normal, 0)
.getAsOpaquePtr());
}
@@ -4469,7 +4469,7 @@
return CompilerType(
this, ast_ctx
->getConstantArrayType(
- qual_type, llvm::APInt(64, size),
+ qual_type, llvm::APInt(64, size), nullptr,
clang::ArrayType::ArraySizeModifier::Normal, 0)
.getAsOpaquePtr());
else