[PATCH] D80751: [clang][diagnostics] Add '-Wundef-prefix' warning option

Zixu Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 9 12:40:47 PDT 2020


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,
----------------
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`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80751





More information about the cfe-commits mailing list