[cfe-commits] r152273 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td test/FixIt/fixit-recursive-block.c
Fariborz Jahanian
fjahanian at apple.com
Wed Mar 7 16:52:25 PST 2012
Author: fjahanian
Date: Wed Mar 7 18:52:24 2012
New Revision: 152273
URL: http://llvm.org/viewvc/llvm-project?rev=152273&view=rev
Log:
improve on diagnostic when block captures uninitialized
block variable. // rdar://10817031
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/test/FixIt/fixit-recursive-block.c
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=152273&r1=152272&r2=152273&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Wed Mar 7 18:52:24 2012
@@ -1147,7 +1147,7 @@
"block pointer variable %0 is uninitialized when captured by block">,
InGroup<Uninitialized>, DefaultIgnore;
def note_block_var_fixit_add_initialization : Note<
- "consider using a '__block' variable %0 to silence this warning">;
+ "maybe you meant to use __block %0">;
def note_var_fixit_add_initialization : Note<
"initialize the variable %0 to silence this warning">;
def err_init_incomplete_type : Error<"initialization of incomplete type %0">;
Modified: cfe/trunk/test/FixIt/fixit-recursive-block.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/FixIt/fixit-recursive-block.c?rev=152273&r1=152272&r2=152273&view=diff
==============================================================================
--- cfe/trunk/test/FixIt/fixit-recursive-block.c (original)
+++ cfe/trunk/test/FixIt/fixit-recursive-block.c Wed Mar 7 18:52:24 2012
@@ -5,7 +5,7 @@
int main() {
void (^arc_fail)() = ^() { // expected-warning {{block pointer variable 'arc_fail' is uninitialized when captured by block}} \
- // expected-note {{consider using a '__block' variable 'arc_fail' to silence this warning}}
+ // expected-note {{maybe you meant to use __block 'arc_fail'}}
arc_fail(); // BOOM
};
}
More information about the cfe-commits
mailing list