]> granicus.if.org Git - clang/commitdiff
improve on diagnostic when block captures uninitialized
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 8 Mar 2012 00:52:24 +0000 (00:52 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 8 Mar 2012 00:52:24 +0000 (00:52 +0000)
block variable. // rdar://10817031

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152273 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
test/FixIt/fixit-recursive-block.c

index ec7a0597f1d0d338315cc5ac180b5d7acd3af3b7..07a94be54b7331543774b7ebb969b46f8c6b4df8 100644 (file)
@@ -1147,7 +1147,7 @@ def warn_uninit_byref_blockvar_captured_by_block : Warning<
   "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">;
index c1f69266b3b93dc3e4531e1e3e3f7662f493fc49..b276b417ac963a0aba02ce0e9a91b7ffd019b5ef 100644 (file)
@@ -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
     };
 }