Fix <rdar://problem/6243788> clang: Incorrect return statement for Blocks?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56590 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 3cadd52..df832b7 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -679,7 +679,9 @@
   // 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();