summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate/ARCMT.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-05-19 22:51:11 +0000
committerAlp Toker <alp@nuanti.com>2014-05-19 22:51:11 +0000
commit403a4f9b826da18c593b1863558e2ad28db867a9 (patch)
treec090dbc86c74dbe10296e5fdd9775d6e08f162b0 /clang/lib/ARCMigrate/ARCMT.cpp
parent156a853ccb1030220fc6b407e2a9517dff380bb5 (diff)
downloadbcm5719-llvm-403a4f9b826da18c593b1863558e2ad28db867a9.tar.gz
bcm5719-llvm-403a4f9b826da18c593b1863558e2ad28db867a9.zip
Get ARCMT/GC-check-warn-nsalloc.m working
The -no-ns-alloc-error migration option now causes the diagnostic to be ignored completely. If this isn't desired, the error can be downgraded to a warning using the usual -Wno-error=arcmt-ns-alloc. Note that we can't use -verify right now on this test because VerifyDiagnosticConsumer gets confused by multiple SourceManager instances, which is presumably the reason it was XFAILed in the first place and why the regression wasn't detected. We'll grep instead for now. llvm-svn: 209172
Diffstat (limited to 'clang/lib/ARCMigrate/ARCMT.cpp')
-rw-r--r--clang/lib/ARCMigrate/ARCMT.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/ARCMigrate/ARCMT.cpp b/clang/lib/ARCMigrate/ARCMT.cpp
index 178ec84e201..88ff50fcf96 100644
--- a/clang/lib/ARCMigrate/ARCMT.cpp
+++ b/clang/lib/ARCMigrate/ARCMT.cpp
@@ -311,10 +311,9 @@ bool arcmt::checkForManualIssues(CompilerInvocation &origCI,
MigrationPass pass(Ctx, OrigGCMode, Unit->getSema(), testAct, capturedDiags,
ARCMTMacroLocs);
pass.setNoFinalizeRemoval(NoFinalizeRemoval);
- Diags->setDiagnosticMapping(diag::err_arcmt_nsalloc_realloc,
- NoNSAllocReallocError ? diag::MAP_WARNING
- : diag::MAP_ERROR,
- SourceLocation());
+ if (NoNSAllocReallocError)
+ Diags->setDiagnosticMapping(diag::warn_arcmt_nsalloc_realloc,
+ diag::MAP_IGNORE, SourceLocation());
for (unsigned i=0, e = transforms.size(); i != e; ++i)
transforms[i](pass);
OpenPOWER on IntegriCloud