aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2021-09-28 18:33:26 -0700
committerArthur Eubanks <aeubanks@google.com>2021-09-30 11:36:30 -0700
commit76902079e42958118f01b4550d68a9b54c9e8e7e (patch)
tree8a50dac0a3aa59d00654804c8ce2a3e8e859eb85 /clang/lib/Frontend/CompilerInvocation.cpp
parent691814f9cc79ff3b63cb53946a88c4db9c1f048d (diff)
downloadllvm-76902079e42958118f01b4550d68a9b54c9e8e7e.zip
llvm-76902079e42958118f01b4550d68a9b54c9e8e7e.tar.gz
llvm-76902079e42958118f01b4550d68a9b54c9e8e7e.tar.bz2
[clang] Don't modify OptRemark if the argument is not relevant
A followup to D110201. For example, we'd set OptimizationRemarkMissed's Regex to '.*' when encountering -Rpass. Normally this doesn't actually affect remarks we emit because in clang::ProcessWarningOptions() we'll separately look at all -R arguments and turn on/off corresponding diagnostic groups. However, this is reproducible with -round-trip-args. Reviewed By: JamesNagurne Differential Revision: https://reviews.llvm.org/D110673
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 30a80d3..e9eed36 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1201,6 +1201,8 @@ ParseOptimizationRemark(DiagnosticsEngine &Diags, ArgList &Args,
Result.Kind = CodeGenOptions::RK_Disabled;
else if (Value == "no-everything")
Result.Kind = CodeGenOptions::RK_DisabledEverything;
+ else
+ continue;
if (Result.Kind == CodeGenOptions::RK_Disabled ||
Result.Kind == CodeGenOptions::RK_DisabledEverything) {