summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-08-30 20:43:09 +0000
committerJordan Rose <jordan_rose@apple.com>2012-08-30 20:43:09 +0000
commit03fac27bab5146c151c07b0c6213075568722e19 (patch)
treebd2975773de095a744c4923e4f908801630b1c7c
parent73e306e548cd07f067ec4465a39b5fd3ea38dd0c (diff)
downloadbcm5719-llvm-03fac27bab5146c151c07b0c6213075568722e19.tar.gz
bcm5719-llvm-03fac27bab5146c151c07b0c6213075568722e19.zip
[analyzer] Plist diagnostics: Fix a case where we fail to close an XML tag.
If the current path diagnostic does /not/ have files associated with it, we were simply skipping on to the next diagnostic with 'continue'. But that also skipped the close tag for the diagnostic's <dict> node. Part of fixing our internal analyzer buildbot. llvm-svn: 162939
-rw-r--r--clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
index 79b2a1ce7f1..c038b632e9a 100644
--- a/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
+++ b/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
@@ -500,8 +500,6 @@ void PlistDiagnostics::FlushDiagnosticsImpl(
if (!filesMade->empty()) {
StringRef lastName;
PDFileEntry::ConsumerFiles *files = filesMade->getFiles(*D);
- if (!files)
- continue;
for (PDFileEntry::ConsumerFiles::const_iterator CI = files->begin(),
CE = files->end(); CI != CE; ++CI) {
StringRef newName = CI->first;
@@ -515,7 +513,8 @@ void PlistDiagnostics::FlushDiagnosticsImpl(
}
o << " <string>" << CI->second << "</string>\n";
}
- o << " </array>\n";
+ if (!lastName.empty())
+ o << " </array>\n";
}
// Close up the entry.
OpenPOWER on IntegriCloud