[cfe-commits] r170040 - /cfe/trunk/lib/ARCMigrate/ARCMT.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Wed Dec 12 14:48:28 PST 2012
Author: akirtzidis
Date: Wed Dec 12 16:48:28 2012
New Revision: 170040
URL: http://llvm.org/viewvc/llvm-project?rev=170040&view=rev
Log:
[arcmt] When capturing ARC errors, have a sanity check to make sure
the diagnostic has a valid location.
Modified:
cfe/trunk/lib/ARCMigrate/ARCMT.cpp
Modified: cfe/trunk/lib/ARCMigrate/ARCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ARCMT.cpp?rev=170040&r1=170039&r2=170040&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ARCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ARCMT.cpp Wed Dec 12 16:48:28 2012
@@ -130,7 +130,8 @@
const Diagnostic &Info) {
if (DiagnosticIDs::isARCDiagnostic(Info.getID()) ||
level >= DiagnosticsEngine::Error || level == DiagnosticsEngine::Note) {
- CapturedDiags.push_back(StoredDiagnostic(level, Info));
+ if (Info.getLocation().isValid())
+ CapturedDiags.push_back(StoredDiagnostic(level, Info));
return;
}
More information about the cfe-commits
mailing list