diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-06-08 04:24:21 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-06-08 04:24:21 +0000 |
commit | 687abffee40d0459fe5eecf3e5ee6e60be69d93c (patch) | |
tree | 84700b898af8fe2c81d9ae12ab7f1c96d5d1a69a /lib/AST/ASTContext.cpp | |
parent | 02d95baf23cbb29ea4ca58b3e8f54f92f845b900 (diff) |
Don't allow defining a block with a non-prototype type. Remove a
hack which introduces some strange inconsistencies in compatibility
for block pointers.
Note that unlike an earlier revision proposed on cfe-commits, this patch
still allows declaring block pointers without a prototype.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73041 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r-- | lib/AST/ASTContext.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index e6dea7cca9..5c886b8983 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -2853,12 +2853,6 @@ QualType::GCAttrTypes ASTContext::getObjCGCAttrKind(const QualType &Ty) const { /// FIXME: When the dust settles on this integration, fold this into mergeTypes. /// bool ASTContext::typesAreBlockCompatible(QualType lhs, QualType rhs) { - const FunctionType *lbase = lhs->getAsFunctionType(); - const FunctionType *rbase = rhs->getAsFunctionType(); - const FunctionProtoType *lproto = dyn_cast<FunctionProtoType>(lbase); - const FunctionProtoType *rproto = dyn_cast<FunctionProtoType>(rbase); - if (lproto && rproto == 0) - return false; return !mergeTypes(lhs, rhs).isNull(); } |