forked from OSchip/llvm-project
[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
This commit is contained in:
parent
73e306e548
commit
03fac27bab
|
@ -500,8 +500,6 @@ void PlistDiagnostics::FlushDiagnosticsImpl(
|
||||||
if (!filesMade->empty()) {
|
if (!filesMade->empty()) {
|
||||||
StringRef lastName;
|
StringRef lastName;
|
||||||
PDFileEntry::ConsumerFiles *files = filesMade->getFiles(*D);
|
PDFileEntry::ConsumerFiles *files = filesMade->getFiles(*D);
|
||||||
if (!files)
|
|
||||||
continue;
|
|
||||||
for (PDFileEntry::ConsumerFiles::const_iterator CI = files->begin(),
|
for (PDFileEntry::ConsumerFiles::const_iterator CI = files->begin(),
|
||||||
CE = files->end(); CI != CE; ++CI) {
|
CE = files->end(); CI != CE; ++CI) {
|
||||||
StringRef newName = CI->first;
|
StringRef newName = CI->first;
|
||||||
|
@ -515,7 +513,8 @@ void PlistDiagnostics::FlushDiagnosticsImpl(
|
||||||
}
|
}
|
||||||
o << " <string>" << CI->second << "</string>\n";
|
o << " <string>" << CI->second << "</string>\n";
|
||||||
}
|
}
|
||||||
o << " </array>\n";
|
if (!lastName.empty())
|
||||||
|
o << " </array>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close up the entry.
|
// Close up the entry.
|
||||||
|
|
Loading…
Reference in New Issue