From: Renato Golin Date: Tue, 11 Oct 2016 10:26:33 +0000 (+0000) Subject: Revert "[Driver][Diagnostics] Make 'show option names' default for driver warnings" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=87d6d429607613bd47c0976f14e9ecb0a7303b87;p=clang Revert "[Driver][Diagnostics] Make 'show option names' default for driver warnings" This reverts commit r283827, as it's breaking all ARM/AARch64 bots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283868 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Frontend/CompilerInvocation.h b/include/clang/Frontend/CompilerInvocation.h index cb037c2654..66ba60d39e 100644 --- a/include/clang/Frontend/CompilerInvocation.h +++ b/include/clang/Frontend/CompilerInvocation.h @@ -48,8 +48,7 @@ class DiagnosticsEngine; /// report the error(s). bool ParseDiagnosticArgs(DiagnosticOptions &Opts, llvm::opt::ArgList &Args, DiagnosticsEngine *Diags = nullptr, - bool DefaultDiagColor = true, - bool DefaultShowOpt = true); + bool DefaultDiagColor = true); class CompilerInvocationBase : public RefCountedBase { void operator=(const CompilerInvocationBase &) = delete; diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 39588e8af8..efffd3031d 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -957,7 +957,7 @@ static bool parseShowColorsArgs(const ArgList &Args, bool DefaultColor) { bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args, DiagnosticsEngine *Diags, - bool DefaultDiagColor, bool DefaultShowOpt) { + bool DefaultDiagColor) { using namespace options; bool Success = true; @@ -977,9 +977,7 @@ bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args, Opts.ShowFixits = !Args.hasArg(OPT_fno_diagnostics_fixit_info); Opts.ShowLocation = !Args.hasArg(OPT_fno_show_source_location); Opts.AbsolutePath = Args.hasArg(OPT_fdiagnostics_absolute_paths); - Opts.ShowOptionNames = - Args.hasFlag(OPT_fdiagnostics_show_option, - OPT_fno_diagnostics_show_option, DefaultShowOpt); + Opts.ShowOptionNames = Args.hasArg(OPT_fdiagnostics_show_option); llvm::sys::Process::UseANSIEscapeCodes(Args.hasArg(OPT_fansi_escape_codes)); @@ -2406,9 +2404,8 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, Success &= ParseAnalyzerArgs(*Res.getAnalyzerOpts(), Args, Diags); Success &= ParseMigratorArgs(Res.getMigratorOpts(), Args); ParseDependencyOutputArgs(Res.getDependencyOutputOpts(), Args); - Success &= - ParseDiagnosticArgs(Res.getDiagnosticOpts(), Args, &Diags, - false /*DefaultDiagColor*/, false /*DefaultShowOpt*/); + Success &= ParseDiagnosticArgs(Res.getDiagnosticOpts(), Args, &Diags, + false /*DefaultDiagColor*/); ParseCommentArgs(LangOpts.CommentOpts, Args); ParseFileSystemArgs(Res.getFileSystemOpts(), Args); // FIXME: We shouldn't have to pass the DashX option around here diff --git a/test/Driver/show-option-names.c b/test/Driver/show-option-names.c deleted file mode 100644 index 928fe8818a..0000000000 --- a/test/Driver/show-option-names.c +++ /dev/null @@ -1,5 +0,0 @@ -// RUN: (%clang -c -target i386-apple-darwin10 -isysroot /FOO %s 2>&1 || true) | FileCheck --check-prefix=CHECK-SHOW-OPTION-NAMES %s -// CHECK-SHOW-OPTION-NAMES: warning: no such sysroot directory: '{{([A-Za-z]:.*)?}}/FOO' [-Wmissing-sysroot] - -// RUN: (%clang -c -target i386-apple-darwin10 -fno-diagnostics-show-option -isysroot /FOO %s 2>&1 || true) | FileCheck --check-prefix=CHECK-NO-SHOW-OPTION-NAMES %s -// CHECK-NO-SHOW-OPTION-NAMES: warning: no such sysroot directory: '{{([A-Za-z]:.*)?}}/FOO'{{$}}