[cfe-commits] r49327 - /cfe/trunk/lib/AST/ASTContext.cpp
Chris Lattner
sabre at nondot.org
Sun Apr 6 23:58:21 PDT 2008
Author: lattner
Date: Mon Apr 7 01:58:21 2008
New Revision: 49327
URL: http://llvm.org/viewvc/llvm-project?rev=49327&view=rev
Log:
fix a bug I introduced in my previous checkin.
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=49327&r1=49326&r2=49327&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Mon Apr 7 01:58:21 2008
@@ -1515,17 +1515,14 @@
// C99 6.7.5.2p6
static bool areCompatArrayTypes(ArrayType *LHS, ArrayType *RHS, ASTContext &C) {
- // Compatible arrays must have compatible element types
- QualType ltype = LHS->getElementType();
- QualType rtype = RHS->getElementType();
-
// Constant arrays must be the same size to be compatible.
if (const ConstantArrayType* LCAT = dyn_cast<ConstantArrayType>(LHS))
if (const ConstantArrayType* RCAT = dyn_cast<ConstantArrayType>(RHS))
if (RCAT->getSize() != LCAT->getSize())
return false;
- return C.typesAreCompatible(QualType(LHS, 0), QualType(RHS, 0));
+ // Compatible arrays must have compatible element types
+ return C.typesAreCompatible(LHS->getElementType(), RHS->getElementType());
}
/// areCompatVectorTypes - Return true if the two specified vector types are
More information about the cfe-commits
mailing list