diff options
author | Steve Naroff <snaroff@apple.com> | 2008-09-24 22:26:48 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-09-24 22:26:48 +0000 |
commit | c60873ce44253fdee24f3f6982701837b1ef2bf5 (patch) | |
tree | 57a132c804ad68f8faeacf6af1a4ed312c25459d /clang/lib/Sema/SemaStmt.cpp | |
parent | 2d59db7ae401c4686476671afcceb54312b4133e (diff) | |
download | bcm5719-llvm-c60873ce44253fdee24f3f6982701837b1ef2bf5.tar.gz bcm5719-llvm-c60873ce44253fdee24f3f6982701837b1ef2bf5.zip |
Fix <rdar://problem/6243788> clang: Incorrect return statement for Blocks?
llvm-svn: 56590
Diffstat (limited to 'clang/lib/Sema/SemaStmt.cpp')
-rw-r--r-- | clang/lib/Sema/SemaStmt.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index 3cadd526a77..df832b70dc7 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -679,7 +679,9 @@ Sema::ActOnBlockReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) { // the block from it. if (CurBlock->ReturnType == 0) { if (RetValExp) { - UsualUnaryConversions(RetValExp); + // Don't call UsualUnaryConversions(), since we don't want to do + // integer promotions here. + DefaultFunctionArrayConversion(RetValExp); CurBlock->ReturnType = RetValExp->getType().getTypePtr(); } else CurBlock->ReturnType = Context.VoidTy.getTypePtr(); |