diff options
| author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2017-04-12 21:46:20 +0000 |
|---|---|---|
| committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2017-04-12 21:46:20 +0000 |
| commit | 52dfe7164537321f881657fb11aa88e9fbc7ae11 (patch) | |
| tree | 2b44a36a405ab05a77a525177d9a1769a2a35f1a /clang/docs | |
| parent | c69f9f3530dc964d2dd809ad4077394192aef7de (diff) | |
| download | bcm5719-llvm-52dfe7164537321f881657fb11aa88e9fbc7ae11.tar.gz bcm5719-llvm-52dfe7164537321f881657fb11aa88e9fbc7ae11.zip | |
[Driver] Add compiler option to generate a reproducer
One way to currently test the reproducers is to setup
"FORCE_CLANG_DIAGNOSTICS_CRASH=1" before invoking clang. This simulates
a crash and produces the same contents needed by the reproducers. The
reproducers are specially useful when triaging Modules issues, not only
on crashes, but also for reproducing misleading warnings, errors, etc.
Add a '-gen-reproducer' driver option to clang (or any similar name) and
give users a flag option.
Note that clang already has a -fno-crash-diagnostics, which disables the
crash reproducers. I've decided not to propose "-fcrash-diagnostics"
since it doesn't convey the ideia of reproduction despite a crash.
rdar://problem/24114619
Differential Revision: https://reviews.llvm.org/D27604
llvm-svn: 300109
Diffstat (limited to 'clang/docs')
| -rw-r--r-- | clang/docs/UsersManual.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst index beb55ca251e..7362456202b 100644 --- a/clang/docs/UsersManual.rst +++ b/clang/docs/UsersManual.rst @@ -562,6 +562,16 @@ control the crash diagnostics. The -fno-crash-diagnostics flag can be helpful for speeding the process of generating a delta reduced test case. +Clang is also capable of generating preprocessed source file(s) and associated +run script(s) even without a crash. This is specially useful when trying to +generate a reproducer for warnings or errors while using modules. + +.. option:: -gen-reproducer + + Generates preprocessed source files, a reproducer script and if relevant, a + cache containing: built module pcm's and all headers needed to rebuilt the + same modules. + .. _rpass: Options to Emit Optimization Reports |

