zixuw added inline comments.

================
Comment at: clang/lib/Lex/PPExpressions.cpp:262
+          // string to UndefPrefixes as an explicit "-Wundef" does.
+          if (UndefPrefixes.empty() ||
+              llvm::any_of(UndefPrefixes,
----------------
arphaman wrote:
> zixuw wrote:
> > ributzka wrote:
> > > What happens when you use `-Werror=undef` and `-Wundef-prefix=<arg>`?
> > Then we only get errors for `undef-prefix=<arg>`. Yes this needs to be 
> > fixed.
> > Perhaps a better way to handle the `-Werror=undef` implication of `-Wundef`.
> We should try to fix this in this PR then. Can you check the severity of the 
> diagnostic, and if it's an error always emit it here?
That is an option. But then we lose the ability to intentionally turning just 
the prefixes into errors, like `-Wundef-prefix=FOO -Werror` or 
`-Wundef-prefix=BAR -Werror=undef-prefix`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80751/new/

https://reviews.llvm.org/D80751



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to