From f238aa4f556c0aa3024abebaf3bdbf5f3f68fb94 Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Mon, 15 Oct 2012 22:48:19 +0000 Subject: [PATCH] [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 --- lib/StaticAnalyzer/Core/PlistDiagnostics.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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(); -- 2.40.0