llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang-driver Author: parabola94 <details> <summary>Changes</summary> -fno-crash-diagnostic is an alias of -gen-reproducer=off. That means the check for -fno-crash-diagnostic does not work as expected. This patch resolves it. --- Full diff: https://github.com/llvm/llvm-project/pull/244888.diff 1 Files Affected: - (modified) clang/lib/Driver/Driver.cpp (+4-2) ``````````diff diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 54daa1c4fb5c5..08ed797675f36 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -2087,8 +2087,10 @@ static const char BugReportMsg[] = void Driver::generateCompilationDiagnostics( Compilation &C, const Command &FailingCommand, StringRef AdditionalInformation, CompilationDiagnosticReport *Report) { - if (C.getArgs().hasArg(options::OPT_fno_crash_diagnostics)) - return; + // -fno-crash-diagnostics is mapped to -gen-reproducer=off. + if (Arg *A = C.getArgs().getLastArg(options::OPT_gen_reproducer_eq)) + if (StringRef val = A->getValue(); val == "off") + return; bool HasCrashTar = C.getArgs().hasArg(options::OPT_fcrash_diagnostics_tar); `````````` </details> https://github.com/llvm/llvm-project/pull/244888 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
