summaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2018-01-23 19:28:52 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2018-01-23 19:28:52 +0000
commit74a822fbaaac85aebc68c4be95e90a0186707bce (patch)
tree5a1d4c7f6549f5ef2d57b3e0ad1a8fb0bc755fde /lib/Frontend/CompilerInvocation.cpp
parentf964f9aece5be8dff1a5a820ffbe1a452b31b220 (diff)
downloadclang-74a822fbaaac85aebc68c4be95e90a0186707bce.tar.gz
[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323245 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 74db7f89cf..b107f65adf 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/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<Args.getNumInputArgStrings(); i++) {
+ if (i != 0)
+ os << " ";
+ os << Args.getArgString(i);
+ }
+ os.flush();
+
return Success;
}