summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-04-01 01:17:39 +0000
committerMike Stump <mrs@apple.com>2009-04-01 01:17:39 +0000
commitcafa0a9746d97e8804255cd73012c245c18360dc (patch)
treeda4ac91e9e8cef028bb06b0e7ddecb7f0f910fbc /clang/lib/AST/ASTContext.cpp
parent237f349073409f698e242cb80412f1feeec223d4 (diff)
downloadbcm5719-llvm-cafa0a9746d97e8804255cd73012c245c18360dc.tar.gz
bcm5719-llvm-cafa0a9746d97e8804255cd73012c245c18360dc.zip
Fix block comparisons. Radar 6732116.
llvm-svn: 68171
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index cede0e55639..bdc7e4484c2 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -2701,9 +2701,9 @@ bool ASTContext::typesAreBlockCompatible(QualType lhs, QualType rhs) {
const FunctionType *rbase = rhs->getAsFunctionType();
const FunctionProtoType *lproto = dyn_cast<FunctionProtoType>(lbase);
const FunctionProtoType *rproto = dyn_cast<FunctionProtoType>(rbase);
- if (lproto && rproto)
- return !mergeTypes(lhs, rhs).isNull();
- return false;
+ if (lproto && rproto == 0)
+ return false;
+ return !mergeTypes(lhs, rhs).isNull();
}
/// areCompatVectorTypes - Return true if the two specified vector types are
OpenPOWER on IntegriCloud