[cfe-commits] r46502 - /cfe/trunk/Sema/SemaDecl.cpp
Eli Friedman
eli.friedman at gmail.com
Mon Jan 28 23:51:13 PST 2008
Author: efriedma
Date: Tue Jan 29 01:51:12 2008
New Revision: 46502
URL: http://llvm.org/viewvc/llvm-project?rev=46502&view=rev
Log:
Use the canonical type when comparing array types so the comparison
doesn't get confused by typedefs.
Modified:
cfe/trunk/Sema/SemaDecl.cpp
Modified: cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaDecl.cpp?rev=46502&r1=46501&r2=46502&view=diff
==============================================================================
--- cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/Sema/SemaDecl.cpp Tue Jan 29 01:51:12 2008
@@ -296,8 +296,8 @@
if (hasUndefinedLength(NewAT) || hasUndefinedLength(OldAT)) {
if (NewAT->getIndexTypeQualifier() != OldAT->getIndexTypeQualifier())
return false;
- NewQType = NewAT->getElementType();
- OldQType = OldAT->getElementType();
+ NewQType = NewAT->getElementType().getCanonicalType();
+ OldQType = OldAT->getElementType().getCanonicalType();
}
return NewQType == OldQType;
More information about the cfe-commits
mailing list