[cfe-commits] r92715 - /cfe/trunk/lib/AST/ASTContext.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Tue Jan 5 00:15:07 PST 2010
Author: zhongxingxu
Date: Tue Jan 5 02:15:06 2010
New Revision: 92715
URL: http://llvm.org/viewvc/llvm-project?rev=92715&view=rev
Log:
if an arraytype is canonical, then its element is guaranteed to be canonical.
Modified:
cfe/trunk/lib/AST/ASTContext.cpp
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=92715&r1=92714&r2=92715&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Tue Jan 5 02:15:06 2010
@@ -2383,7 +2383,8 @@
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;
More information about the cfe-commits
mailing list