[PATCH] D80751: [clang][diagnostics] Add '-Wundef-prefix' warning option
Zixu Wang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 29 16:06:30 PDT 2020
zixuw updated this revision to Diff 274276.
zixuw added a comment.
Abort the design of making 'Wundef' an alias to 'Wundef-prefix' because it
depends on the alias expansion to work, which adds an empty string to 'UndefPrefixes'
to do the trick. However, any other way to enable 'Wundef', for example, via 'Werror=undef'
or '#pragma clang diagnostic', will not work and cannot be handled easily.
Instead, just suppress 'Wundef-prefix' when 'Wundef' is enabled.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80751/new/
https://reviews.llvm.org/D80751
Files:
clang/include/clang/Basic/DiagnosticLexKinds.td
clang/include/clang/Basic/DiagnosticOptions.h
clang/include/clang/Driver/Options.td
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Lex/PPExpressions.cpp
clang/test/Preprocessor/warn-macro-undef.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80751.274276.patch
Type: text/x-patch
Size: 7315 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200629/ba6c452c/attachment.bin>
More information about the cfe-commits
mailing list