fixes the diagnostic issued in // rdar://11069896

llvm-svn: 153217
This commit is contained in:
Fariborz Jahanian 2012-03-21 20:28:39 +00:00
parent b57321ad3d
commit 0740ed9835
2 changed files with 2 additions and 2 deletions

View File

@ -1888,7 +1888,7 @@ Sema::ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) {
RetValExp->getType()->isVoidType()))) { RetValExp->getType()->isVoidType()))) {
if (!getLangOpts().CPlusPlus && if (!getLangOpts().CPlusPlus &&
RetValExp->getType()->isVoidType()) RetValExp->getType()->isVoidType())
Diag(ReturnLoc, diag::ext_return_has_void_expr) << "" << 2; Diag(ReturnLoc, diag::ext_return_has_void_expr) << "literal" << 2;
else { else {
Diag(ReturnLoc, diag::err_return_block_has_expr); Diag(ReturnLoc, diag::err_return_block_has_expr);
RetValExp = 0; RetValExp = 0;

View File

@ -132,5 +132,5 @@ void foo7()
// rdar://11069896 // rdar://11069896
void (^blk)(void) = ^{ void (^blk)(void) = ^{
return (void)0; // expected-warning {{void block should not return void expression}} return (void)0; // expected-warning {{void block literal should not return void expression}}
}; };