From: Jordan Rose Date: Thu, 30 Aug 2012 20:43:09 +0000 (+0000) Subject: [analyzer] Plist diagnostics: Fix a case where we fail to close an XML tag. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9f5fdbbeff3f60c5e8c0461df48d84365d56fd7;p=clang [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 node. Part of fixing our internal analyzer buildbot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162939 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp b/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp index 79b2a1ce7f..c038b632e9 100644 --- a/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp +++ b/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 << " " << CI->second << "\n"; } - o << " \n"; + if (!lastName.empty()) + o << " \n"; } // Close up the entry.