aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-06-08 04:24:21 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-06-08 04:24:21 +0000
commit687abffee40d0459fe5eecf3e5ee6e60be69d93c (patch)
tree84700b898af8fe2c81d9ae12ab7f1c96d5d1a69a /lib/Sema/SemaExpr.cpp
parent02d95baf23cbb29ea4ca58b3e8f54f92f845b900 (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/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index ee5132a7d8..98d3a23e60 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -5220,7 +5220,7 @@ Sema::OwningExprResult Sema::ActOnBlockStmtExpr(SourceLocation CaretLoc,
QualType BlockTy;
if (!BSI->hasPrototype)
- BlockTy = Context.getFunctionNoProtoType(RetTy);
+ BlockTy = Context.getFunctionType(RetTy, 0, 0, false, 0);
else
BlockTy = Context.getFunctionType(RetTy, ArgTypes.data(), ArgTypes.size(),
BSI->isVariadic, 0);