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()))) {
if (!getLangOpts().CPlusPlus &&
RetValExp->getType()->isVoidType())
Diag(ReturnLoc, diag::ext_return_has_void_expr) << "" << 2;
Diag(ReturnLoc, diag::ext_return_has_void_expr) << "literal" << 2;
else {
Diag(ReturnLoc, diag::err_return_block_has_expr);
RetValExp = 0;

View File

@ -132,5 +132,5 @@ void foo7()
// rdar://11069896
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}}
};