forked from OSchip/llvm-project
fixes the diagnostic issued in // rdar://11069896
llvm-svn: 153217
This commit is contained in:
parent
b57321ad3d
commit
0740ed9835
|
@ -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;
|
||||
|
|
|
@ -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}}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue