r209184 - ARCMT/GC-check-warn-nsalloc.m: don't provide a diag group
Alp Toker
alp at nuanti.com
Mon May 19 16:48:49 PDT 2014
Author: alp
Date: Mon May 19 18:48:49 2014
New Revision: 209184
URL: http://llvm.org/viewvc/llvm-project?rev=209184&view=rev
Log:
ARCMT/GC-check-warn-nsalloc.m: don't provide a diag group
This diagnostic is now controlled solely by -no-ns-alloc-error thus matching
the original intended behaviour.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td
cfe/trunk/lib/ARCMigrate/ARCMT.cpp
cfe/trunk/test/ARCMT/GC-check-warn-nsalloc.m
cfe/trunk/test/Misc/warning-flags.c
Modified: cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td?rev=209184&r1=209183&r2=209184&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td Mon May 19 18:48:49 2014
@@ -143,7 +143,7 @@ def warn_mt_message : Warning<"[rewriter
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">;
}
Modified: cfe/trunk/lib/ARCMigrate/ARCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ARCMT.cpp?rev=209184&r1=209183&r2=209184&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ARCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ARCMT.cpp Mon May 19 18:48:49 2014
@@ -311,9 +311,9 @@ bool arcmt::checkForManualIssues(Compile
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);
Modified: cfe/trunk/test/ARCMT/GC-check-warn-nsalloc.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/GC-check-warn-nsalloc.m?rev=209184&r1=209183&r2=209184&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/GC-check-warn-nsalloc.m (original)
+++ cfe/trunk/test/ARCMT/GC-check-warn-nsalloc.m Mon May 19 18:48:49 2014
@@ -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
Modified: cfe/trunk/test/Misc/warning-flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Misc/warning-flags.c?rev=209184&r1=209183&r2=209184&view=diff
==============================================================================
--- cfe/trunk/test/Misc/warning-flags.c (original)
+++ cfe/trunk/test/Misc/warning-flags.c Mon May 19 18:48:49 2014
@@ -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_mai
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
More information about the cfe-commits
mailing list