summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/Frontend/CompilerInvocation.h3
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp11
-rw-r--r--clang/test/Driver/show-option-names.c5
3 files changed, 5 insertions, 14 deletions
diff --git a/clang/include/clang/Frontend/CompilerInvocation.h b/clang/include/clang/Frontend/CompilerInvocation.h
index cb037c26546..66ba60d39ec 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<CompilerInvocation> {
void operator=(const CompilerInvocationBase &) = delete;
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 39588e8af86..efffd3031d2 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 928fe8818a6..00000000000
--- 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'{{$}}
OpenPOWER on IntegriCloud