]> granicus.if.org Git - clang/commitdiff
ARCMT/GC-check-warn-nsalloc.m: don't provide a diag group
authorAlp Toker <alp@nuanti.com>
Mon, 19 May 2014 23:48:49 +0000 (23:48 +0000)
committerAlp Toker <alp@nuanti.com>
Mon, 19 May 2014 23:48:49 +0000 (23:48 +0000)
This diagnostic is now controlled solely by -no-ns-alloc-error thus matching
the original intended behaviour.

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

include/clang/Basic/DiagnosticCommonKinds.td
lib/ARCMigrate/ARCMT.cpp
test/ARCMT/GC-check-warn-nsalloc.m
test/Misc/warning-flags.c

index b6260627c7372715f8e672aecbfdca93f2e34b14..74d628e51994d0d11acea15fe93c920216993ffb 100644 (file)
@@ -143,7 +143,7 @@ def warn_mt_message : Warning<"[rewriter] %0">;
 def note_mt_message : Note<"[rewriter] %0">;
 
 // ARCMigrate
-def warn_arcmt_nsalloc_realloc : Warning<"[rewriter] call returns pointer to GC managed memory; it will become unmanaged in ARC">, InGroup<DiagGroup<"arcmt-ns-alloc">>, DefaultError;
+def warn_arcmt_nsalloc_realloc : Warning<"[rewriter] call returns pointer to GC managed memory; it will become unmanaged in ARC">;
 def err_arcmt_nsinvocation_ownership : Error<"NSInvocation's %0 is not safe to be used with an object with ownership other than __unsafe_unretained">;
 
 }
index 88ff50fcf96331a85e4cfcb5a64839504e025108..617bb6875e6134ee29ad9f840190c37f101777ed 100644 (file)
@@ -311,9 +311,9 @@ bool arcmt::checkForManualIssues(CompilerInvocation &origCI,
   MigrationPass pass(Ctx, OrigGCMode, Unit->getSema(), testAct, capturedDiags,
                      ARCMTMacroLocs);
   pass.setNoFinalizeRemoval(NoFinalizeRemoval);
-  if (NoNSAllocReallocError)
+  if (!NoNSAllocReallocError)
     Diags->setDiagnosticMapping(diag::warn_arcmt_nsalloc_realloc,
-                                diag::MAP_IGNORE, SourceLocation());
+                                diag::MAP_ERROR, SourceLocation());
 
   for (unsigned i=0, e = transforms.size(); i != e; ++i)
     transforms[i](pass);
index 19a8d3dc5f74782f8df3aea9b8874021a4a82ff8..44ccc95e3f7ce29355bc550cf9eef8e3674a7f59 100644 (file)
@@ -1,6 +1,5 @@
-// RUN: %clang_cc1 -arcmt-check -Werror -no-ns-alloc-error -triple x86_64-apple-darwin10 -fobjc-gc-only %s
-// RUN: %clang_cc1 -arcmt-check -Wno-error=arcmt-ns-alloc -triple x86_64-apple-darwin10 -fobjc-gc-only %s 2>&1 | grep 'warning: \[rewriter\] call returns pointer to GC managed memory'
-// RUN: %clang_cc1 -arcmt-check -Werror -no-ns-alloc-error -triple x86_64-apple-darwin10 -fobjc-gc-only -x objective-c++ %s
+// RUN: %clang_cc1 -arcmt-check -no-ns-alloc-error -triple x86_64-apple-darwin10 -fobjc-gc-only %s 2>&1 | grep 'warning: \[rewriter\] call returns pointer to GC managed memory'
+// RUN: %clang_cc1 -arcmt-check -no-ns-alloc-error -triple x86_64-apple-darwin10 -fobjc-gc-only -x objective-c++ %s 2>&1 | grep 'warning: \[rewriter\] call returns pointer to GC managed memory'
 // TODO: Investigate VerifyDiagnosticConsumer failures on these tests when using -verify.
 // rdar://10532541
 
index 415e1986fc35be826f486461f614d1bd2324ee16..5a45172ed2a0821fed31c57b02285bbdb093be83 100644 (file)
@@ -18,7 +18,7 @@ This test serves two purposes:
 
 The list of warnings below should NEVER grow.  It should gradually shrink to 0.
 
-CHECK: Warnings without flags (105):
+CHECK: Warnings without flags (106):
 CHECK-NEXT:   ext_delete_void_ptr_operand
 CHECK-NEXT:   ext_expected_semi_decl_list
 CHECK-NEXT:   ext_explicit_specialization_storage_class
@@ -45,6 +45,7 @@ CHECK-NEXT:   pp_pragma_sysheader_in_main_file
 CHECK-NEXT:   w_asm_qualifier_ignored
 CHECK-NEXT:   warn_accessor_property_type_mismatch
 CHECK-NEXT:   warn_anon_bitfield_width_exceeds_type_size
+CHECK-NEXT:   warn_arcmt_nsalloc_realloc
 CHECK-NEXT:   warn_asm_label_on_auto_decl
 CHECK-NEXT:   warn_bitfield_width_exceeds_type_size
 CHECK-NEXT:   warn_braces_around_scalar_init