From 87a924e37dc40c6e3e2b33d1dbd646aeccf4c15b Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Fri, 30 Oct 2009 22:56:57 +0000 Subject: [PATCH] Fix a crazy canonical-types bug because canonicalizing a dependently-sized array type with a given expression might end up returning a non-canonical type; see through that non-canonical type to the underlying canonical type. Yes, I have a test case; no, I can't reduce it to the point where it's worth checking in :( git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85633 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/ASTContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index f29f56e278..d445125459 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -2305,7 +2305,7 @@ CanQualType ASTContext::getCanonicalType(QualType T) { DSAT->getSizeExpr()->Retain() : 0, DSAT->getSizeModifier(), DSAT->getIndexTypeCVRQualifiers(), - DSAT->getBracketsRange())); + DSAT->getBracketsRange())->getCanonicalTypeInternal()); VariableArrayType *VAT = cast(AT); return CanQualType::CreateUnsafe(getVariableArrayType(NewEltTy, -- 2.40.0