From: Anna Zaks Date: Mon, 15 Oct 2012 22:48:19 +0000 (+0000) Subject: [analyzer] Embed the analyzer version into the plist output. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f238aa4f556c0aa3024abebaf3bdbf5f3f68fb94;p=clang [analyzer] Embed the analyzer version into the plist output. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165994 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp b/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp index 7d9c2236f4..17ef4cf571 100644 --- a/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp +++ b/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp @@ -13,8 +13,9 @@ #include "clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h" #include "clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h" -#include "clang/Basic/SourceManager.h" #include "clang/Basic/FileManager.h" +#include "clang/Basic/SourceManager.h" +#include "clang/Basic/Version.h" #include "clang/Lex/Preprocessor.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/Casting.h" @@ -409,10 +410,13 @@ void PlistDiagnostics::FlushDiagnosticsImpl( "\n"; // Write the root object: a containing... + // - "clang_version", the string representation of clang version // - "files", an mapping from FIDs to file names // - "diagnostics", an containing the path diagnostics - o << "\n" - " files\n" + o << "\n" << + " clang_version\n"; + EmitString(o, getClangFullVersion()) << '\n'; + o << " files\n" " \n"; for (SmallVectorImpl::iterator I=Fids.begin(), E=Fids.end();