From cafa0a9746d97e8804255cd73012c245c18360dc Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Wed, 1 Apr 2009 01:17:39 +0000 Subject: Fix block comparisons. Radar 6732116. llvm-svn: 68171 --- clang/lib/AST/ASTContext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/AST/ASTContext.cpp') 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(lbase); const FunctionProtoType *rproto = dyn_cast(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 -- cgit v1.2.3