[cfe-commits] r162939 - /cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
Jordan Rose
jordan_rose at apple.com
Thu Aug 30 13:43:09 PDT 2012
Author: jrose
Date: Thu Aug 30 15:43:09 2012
New Revision: 162939
URL: http://llvm.org/viewvc/llvm-project?rev=162939&view=rev
Log:
[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.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp?rev=162939&r1=162938&r2=162939&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp Thu Aug 30 15:43:09 2012
@@ -500,8 +500,6 @@
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 @@
}
o << " <string>" << CI->second << "</string>\n";
}
- o << " </array>\n";
+ if (!lastName.empty())
+ o << " </array>\n";
}
// Close up the entry.
More information about the cfe-commits
mailing list