From c1ae0a8b0022a9fbb50d3413139f36ec5d8a63be Mon Sep 17 00:00:00 2001 From: Zhongxing Xu Date: Tue, 5 Jan 2010 08:15:06 +0000 Subject: [PATCH] if an arraytype is canonical, then its element is guaranteed to be canonical. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92715 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/ASTContext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 74e74e7aba..ad10aa38ed 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -2383,7 +2383,8 @@ QualType ASTContext::getUnqualifiedArrayType(QualType T, assert(!T.hasQualifiers() && "canonical array type has qualifiers!"); const ArrayType *AT = cast(T); QualType Elt = AT->getElementType(); - QualType UnqualElt = getUnqualifiedArrayType(getCanonicalType(Elt), Quals); + assert(Elt.isCanonical()); + QualType UnqualElt = getUnqualifiedArrayType(Elt, Quals); if (Elt == UnqualElt) return T; -- 2.50.1