From 4a190fe62f58eeaa9b996665e27b4d8898b140a7 Mon Sep 17 00:00:00 2001 From: George Karpenkov Date: Tue, 23 Jan 2018 19:28:52 +0000 Subject: [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 --- clang/lib/Frontend/CompilerInvocation.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 74db7f8..b107f65 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -305,6 +305,14 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, } } + llvm::raw_string_ostream os(Opts.FullCompilerInvocation); + for (unsigned i=0; i