summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commitcd321a3544d2b17c5c40d054fab89ef7e83d855a (patch)
treef0d539c2e28f0444b478d86017c2a9b7ef698826 /clang/lib
parent223812d547201224815db2aaf6c5c3f56e681fcc (diff)
downloadbcm5719-llvm-cd321a3544d2b17c5c40d054fab89ef7e83d855a.tar.gz
bcm5719-llvm-cd321a3544d2b17c5c40d054fab89ef7e83d855a.zip
if an arraytype is canonical, then its element is guaranteed to be canonical.
llvm-svn: 92715
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/ASTContext.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 74e74e7aba0..ad10aa38edb 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud