diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-03-21 16:17:22 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-03-21 16:17:22 +0000 |
commit | 7e725bc7a099fefa5e0f03e2208838d3cdf064e3 (patch) | |
tree | cc7b8daa2fee69e4c5183239fc1298d6e124c3b0 /lib/Sema/SemaStmt.cpp | |
parent | 260a3e4370a15bc3da9d2d9461b6f179c68dd348 (diff) |
modern objective-c rewriter: remove 'const' from
pointer field declarations in several meta-data.
// rdar://11079898
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153192 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index ef453f5c6a..333f6dd255 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -1886,8 +1886,13 @@ Sema::ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) { !(getLangOpts().CPlusPlus && (RetValExp->isTypeDependent() || RetValExp->getType()->isVoidType()))) { - Diag(ReturnLoc, diag::err_return_block_has_expr); - RetValExp = 0; + if (!getLangOpts().CPlusPlus && + RetValExp->getType()->isVoidType()) + Diag(ReturnLoc, diag::ext_return_has_void_expr) << "" << 2; + else { + Diag(ReturnLoc, diag::err_return_block_has_expr); + RetValExp = 0; + } } } else if (!RetValExp) { return StmtError(Diag(ReturnLoc, diag::err_block_return_missing_expr)); |