]> granicus.if.org Git - clang/commit
[Driver] Add compiler option to generate a reproducer
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Wed, 12 Apr 2017 21:46:20 +0000 (21:46 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Wed, 12 Apr 2017 21:46:20 +0000 (21:46 +0000)
commitf2ee5f1a8ec33b9bab98782596fe6872a6da7cc0
treea9f56ab370579b22e9f2feaad036a5e1a026b718
parent5e8a35ff84263fd2636595b2cb65054c538a78a2
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300109 91177308-0d34-0410-b5e6-96231b3b80d8
docs/UsersManual.rst
include/clang/Basic/DiagnosticDriverKinds.td
include/clang/Driver/Driver.h
include/clang/Driver/Options.td
lib/Driver/Driver.cpp
test/Driver/crash-report-crashfile.m
tools/driver/driver.cpp