[cfe-commits] [PATCH] Add clang version to scan-build output

Gerald Combs gerald at wireshark.org
Fri May 11 09:45:53 PDT 2012


Hi,

Attached is a trivial patch to add the output of "clang --version" to
the index.html file generated by scan-build. This can be helpful when
you're looking at a scan-build report but don't have access to the
machine that generated the report, e.g. your automated build system
uploads reports to a publicly accessible web site.

-- 
Join us for Sharkfest ’12! · Wireshark® Developer and User Conference
Berkeley, CA, June 24-27 · sharkfest.wireshark.org

-------------- next part --------------
Index: tools/scan-build/scan-build
===================================================================
--- tools/scan-build/scan-build	(revision 156517)
+++ tools/scan-build/scan-build	(working copy)
@@ -98,6 +98,7 @@
   $Clang = $ClangSB;
 }
 my $ClangCXX = $Clang . "++";
+my $ClangVersion = HtmlEscape(`$Clang --version`);
 
 ##----------------------------------------------------------------------------##
 # GetHTMLRunDir - Construct an HTML directory name for the current sub-run.
@@ -590,6 +591,7 @@
 <tr><th>User:</th><td>${UserName}\@${HostName}</td></tr>
 <tr><th>Working Directory:</th><td>${CurrentDir}</td></tr>
 <tr><th>Command Line:</th><td>${CmdArgs}</td></tr>
+<tr><th>Clang Version:</th><td>${ClangVersion}</td></tr>
 <tr><th>Date:</th><td>${Date}</td></tr>
 ENDTEXT
 


More information about the cfe-commits mailing list