From 0740ed983532a30f1e0ac1fe5773865a08a2e4d9 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Wed, 21 Mar 2012 20:28:39 +0000 Subject: [PATCH] fixes the diagnostic issued in // rdar://11069896 llvm-svn: 153217 --- clang/lib/Sema/SemaStmt.cpp | 2 +- clang/test/Sema/block-return.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index 333f6dd25526..1ddedcfe6802 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -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; diff --git a/clang/test/Sema/block-return.c b/clang/test/Sema/block-return.c index 67bc5c7dfe20..6967955b0878 100644 --- a/clang/test/Sema/block-return.c +++ b/clang/test/Sema/block-return.c @@ -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}} };