[cfe-commits] r165994 - /cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp

Anna Zaks ganna at apple.com
Mon Oct 15 15:48:19 PDT 2012


Author: zaks
Date: Mon Oct 15 17:48:19 2012
New Revision: 165994

URL: http://llvm.org/viewvc/llvm-project?rev=165994&view=rev
Log:
[analyzer] Embed the analyzer version into the plist output.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp?rev=165994&r1=165993&r2=165994&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp Mon Oct 15 17:48:19 2012
@@ -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 @@
   "<plist version=\"1.0\">\n";
 
   // Write the root object: a <dict> containing...
+  //  - "clang_version", the string representation of clang version
   //  - "files", an <array> mapping from FIDs to file names
   //  - "diagnostics", an <array> containing the path diagnostics
-  o << "<dict>\n"
-       " <key>files</key>\n"
+  o << "<dict>\n" <<
+       " <key>clang_version</key>\n";
+  EmitString(o, getClangFullVersion()) << '\n';
+  o << " <key>files</key>\n"
        " <array>\n";
 
   for (SmallVectorImpl<FileID>::iterator I=Fids.begin(), E=Fids.end();





More information about the cfe-commits mailing list