diff options
Diffstat (limited to 'lib/StaticAnalyzer')
-rw-r--r-- | lib/StaticAnalyzer/Core/PlistDiagnostics.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp b/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp index c038b632e9..c1c46c293a 100644 --- a/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp +++ b/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp @@ -500,21 +500,22 @@ void PlistDiagnostics::FlushDiagnosticsImpl( if (!filesMade->empty()) { StringRef lastName; PDFileEntry::ConsumerFiles *files = filesMade->getFiles(*D); - for (PDFileEntry::ConsumerFiles::const_iterator CI = files->begin(), - CE = files->end(); CI != CE; ++CI) { - StringRef newName = CI->first; - if (newName != lastName) { - if (!lastName.empty()) { - o << " </array>\n"; + if (files) { + for (PDFileEntry::ConsumerFiles::const_iterator CI = files->begin(), + CE = files->end(); CI != CE; ++CI) { + StringRef newName = CI->first; + if (newName != lastName) { + if (!lastName.empty()) { + o << " </array>\n"; + } + lastName = newName; + o << " <key>" << lastName << "_files</key>\n"; + o << " <array>\n"; } - lastName = newName; - o << " <key>" << lastName << "_files</key>\n"; - o << " <array>\n"; + o << " <string>" << CI->second << "</string>\n"; } - o << " <string>" << CI->second << "</string>\n"; - } - if (!lastName.empty()) o << " </array>\n"; + } } // Close up the entry. |