summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate/ARCMT.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-12-12 22:48:28 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-12-12 22:48:28 +0000
commit1f7321677cebda7fd2bf0adf18afb910f098559f (patch)
tree4b475a90e88f2b3ebde5510ab976417e550fd708 /clang/lib/ARCMigrate/ARCMT.cpp
parentf5b993f7b149d6db83de5db3f2dcc0d45c5c6882 (diff)
downloadbcm5719-llvm-1f7321677cebda7fd2bf0adf18afb910f098559f.tar.gz
bcm5719-llvm-1f7321677cebda7fd2bf0adf18afb910f098559f.zip
[arcmt] When capturing ARC errors, have a sanity check to make sure
the diagnostic has a valid location. llvm-svn: 170040
Diffstat (limited to 'clang/lib/ARCMigrate/ARCMT.cpp')
-rw-r--r--clang/lib/ARCMigrate/ARCMT.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/ARCMigrate/ARCMT.cpp b/clang/lib/ARCMigrate/ARCMT.cpp
index df96ac8eaa8..6b1da08ce67 100644
--- a/clang/lib/ARCMigrate/ARCMT.cpp
+++ b/clang/lib/ARCMigrate/ARCMT.cpp
@@ -130,7 +130,8 @@ public:
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;
}
OpenPOWER on IntegriCloud