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()))) {
|
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;
|
||||||
|
|
|
@ -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}}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue