From 93d683fc2e225e15024bbe68bc2cc958d24acf1f Mon Sep 17 00:00:00 2001 From: Renato Golin Date: Tue, 11 Oct 2016 10:26:33 +0000 Subject: [PATCH] Revert "[Driver][Diagnostics] Make 'show option names' default for driver warnings" This reverts commit r283827, as it's breaking all ARM/AARch64 bots. llvm-svn: 283868 --- clang/include/clang/Frontend/CompilerInvocation.h | 3 +-- clang/lib/Frontend/CompilerInvocation.cpp | 11 ++++------- clang/test/Driver/show-option-names.c | 5 ----- 3 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 clang/test/Driver/show-option-names.c diff --git a/clang/include/clang/Frontend/CompilerInvocation.h b/clang/include/clang/Frontend/CompilerInvocation.h index cb037c2..66ba60d 100644 --- a/clang/include/clang/Frontend/CompilerInvocation.h +++ b/clang/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/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 39588e8..efffd30 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/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/clang/test/Driver/show-option-names.c b/clang/test/Driver/show-option-names.c deleted file mode 100644 index 928fe88..0000000 --- a/clang/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'{{$}} -- 2.7.4