[Lldb-commits] [lldb] r373685 - Properly handle instantiation-dependent array bounds.

Richard Smith via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 3 18:26:00 PDT 2019


Author: rsmith
Date: Thu Oct  3 18:25:59 2019
New Revision: 373685

URL: http://llvm.org/viewvc/llvm-project?rev=373685&view=rev
Log:
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.

Modified:
    lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=373685&r1=373684&r2=373685&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Oct  3 18:25:59 2019
@@ -2180,7 +2180,7 @@ CompilerType ClangASTContext::CreateArra
       } 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 @@ CompilerType ClangASTContext::GetArrayTy
         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




More information about the lldb-commits mailing list