summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-07 06:58:21 +0000
committerChris Lattner <sabre@nondot.org>2008-04-07 06:58:21 +0000
commitfa00732562e3f7034a78c6e81c783f54cc79f564 (patch)
treefaf52b65d502b3a095d7b0bb614223bb03153855 /clang/lib/AST/ASTContext.cpp
parente6b27c6ecdd57c12f70c133fdaa8d3fbe63e1a43 (diff)
downloadbcm5719-llvm-fa00732562e3f7034a78c6e81c783f54cc79f564.tar.gz
bcm5719-llvm-fa00732562e3f7034a78c6e81c783f54cc79f564.zip
fix a bug I introduced in my previous checkin.
llvm-svn: 49327
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 4de367551f0..41b00d9535e 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1515,17 +1515,14 @@ bool ASTContext::functionTypesAreCompatible(QualType lhs, QualType rhs) {
// 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
OpenPOWER on IntegriCloud