================
@@ -4248,6 +4248,22 @@ bool CompilerInvocation::ParseLangArgs(LangOptions 
&Opts, ArgList &Args,
       Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Val;
   }
 
+  if (auto *A = Args.getLastArg(OPT_fsanitize_overflow_pattern_exclusion_EQ)) {
+    for (int i = 0, n = A->getNumValues(); i != n; ++i) {
+      StringRef Value = A->getValue(i);
+      if (Value == "none")
+        Opts.OverflowPatternExclusionMask |= LangOptionsBase::None;
----------------
bwendling wrote:

This seems counter-intuitive. Shouldn't this be an assignment instead?

```c
Opts.OverflowPatternExclusionMask = LangOptionsBase::None;
```

Or is that not the behavior you want?

Also, look up `StringSwitch`, which does the same as these if-then statements, 
but in the LLVM way. :-)

https://github.com/llvm/llvm-project/pull/100272
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to