aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-01-05 08:15:06 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-01-05 08:15:06 +0000
commitc1ae0a8b0022a9fbb50d3413139f36ec5d8a63be (patch)
tree05311126c5bff84e27de5e38f566d388c3d431b9 /lib/AST/ASTContext.cpp
parentedcfc411148e81c644a1ff36a9df8a7b08209a23 (diff)
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
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp3
1 files changed, 2 insertions, 1 deletions
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<ArrayType>(T);
QualType Elt = AT->getElementType();
- QualType UnqualElt = getUnqualifiedArrayType(getCanonicalType(Elt), Quals);
+ assert(Elt.isCanonical());
+ QualType UnqualElt = getUnqualifiedArrayType(Elt, Quals);
if (Elt == UnqualElt)
return T;