diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-03-21 16:18:21 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-03-21 16:18:21 +0000 |
commit | 3ef963bab9916ff4d2def248db1ce38a55bfce18 (patch) | |
tree | da5fb2598d2ed3a5f09761ee962cb502900a7a4b /lib/Sema/SemaStmt.cpp | |
parent | 7e725bc7a099fefa5e0f03e2208838d3cdf064e3 (diff) |
Undo previous patch as I checked more than I intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r-- | lib/Sema/SemaStmt.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp index 333f6dd255..ef453f5c6a 100644 --- a/lib/Sema/SemaStmt.cpp +++ b/lib/Sema/SemaStmt.cpp @@ -1886,13 +1886,8 @@ Sema::ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) { !(getLangOpts().CPlusPlus && (RetValExp->isTypeDependent() || RetValExp->getType()->isVoidType()))) { - 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; - } + Diag(ReturnLoc, diag::err_return_block_has_expr); + RetValExp = 0; } } else if (!RetValExp) { return StmtError(Diag(ReturnLoc, diag::err_block_return_missing_expr)); |