diff options
author | George Karpenkov <ekarpenkov@apple.com> | 2018-01-23 19:28:52 +0000 |
---|---|---|
committer | George Karpenkov <ekarpenkov@apple.com> | 2018-01-23 19:28:52 +0000 |
commit | 4a190fe62f58eeaa9b996665e27b4d8898b140a7 (patch) | |
tree | d9e05be5794a782fb50682ae986cbd6b7b5fb06b /clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp | |
parent | 7c540debf27e725a6f50b88264b8f682827670e7 (diff) | |
download | bcm5719-llvm-4a190fe62f58eeaa9b996665e27b4d8898b140a7.tar.gz bcm5719-llvm-4a190fe62f58eeaa9b996665e27b4d8898b140a7.zip |
[analyzer] Show full analyzer invocation for reproducibility in HTML reports
Analyzing problems which appear in scan-build results can be very
difficult, as after the launch no exact invocation is stored, and it's
super-hard to launch the debugger.
With this patch, the exact analyzer invocation appears in the footer,
and can be copied to debug/check reproducibility/etc.
rdar://35980230
llvm-svn: 323245
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp index acddcefc88f..12f6b130130 100644 --- a/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp +++ b/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp @@ -406,6 +406,12 @@ void HTMLDiagnostics::FinalizeHTML(const PathDiagnostic& D, Rewriter &R, <h3>Annotated Source Code</h3> <p>Press <a href="#" onclick="toggleHelp(); return false;">'?'</a> to see keyboard shortcuts</p> +<input type="checkbox" class="spoilerhider" id="showinvocation" /> +<label for="showinvocation" >Show analyzer invocation</label> +<div class="spoiler">clang -cc1 )<<<"; + os << html::EscapeText(AnalyzerOpts.FullCompilerInvocation); + os << R"<<<( +</div> <div id='tooltiphint' hidden="true"> <p>Keyboard shortcuts: </p> <ul> @@ -416,7 +422,6 @@ void HTMLDiagnostics::FinalizeHTML(const PathDiagnostic& D, Rewriter &R, <a href="#" onclick="toggleHelp(); return false;">Close</a> </div> )<<<"; - R.InsertTextBefore(SMgr.getLocForStartOfFile(FID), os.str()); } |