This revision was automatically updated to reflect the committed changes.
Closed by commit rG89a0c4066b0e: [clang][diagnostics] Add
'-Wundef-prefix' warning option (authored by zixuw, committed by
cishida).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.o
ributzka accepted this revision.
ributzka added a comment.
LGTM
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.l
arphaman accepted this revision.
arphaman added a comment.
This revision is now accepted and ready to land.
LGTM.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80751/new/
https://reviews.llvm.org/D80751
__
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 examp
zixuw updated this revision to Diff 274219.
zixuw added a comment.
- Remove implementation details from the help text of 'Wundef';
- Hide help text for 'Wundef-prefix' and 'Wundef'.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80751/new/
https://r
zixuw updated this revision to Diff 274212.
zixuw added a comment.
- Refine test cases to check combinations of 'Wundef' and 'Wundef-prefix', and
with/without 'Werror';
- Fix issues with '-Werror=undef' by explicitly looking for the option.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE L
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:
> >
arphaman added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticGroups.td:108
+def Undefined : DiagGroup<"undef">;
+def UndefinedPrefix : DiagGroup<"undef-prefix", [Undefined]>;
def UnsupportedNan : DiagGroup<"unsupported-nan">;
zixuw wrote:
> ar
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 whe
zixuw updated this revision to Diff 269628.
zixuw added a comment.
Update test case for `#pragma clang diagnostic`
Update test case to verify that the state of `-Wundef` can still be modified
using `#pragma clang diagnostic`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
htt
zixuw added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticGroups.td:108
+def Undefined : DiagGroup<"undef">;
+def UndefinedPrefix : DiagGroup<"undef-prefix", [Undefined]>;
def UnsupportedNan : DiagGroup<"unsupported-nan">;
arphaman wrote:
> It
arphaman added a comment.
Can you still modify the state of `-Wundef` with `#pragma clang diagnostic`?
Could you add a test to cover it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80751/new/
https://reviews.llvm.org/D80751
__
arphaman added inline comments.
Comment at: clang/include/clang/Basic/DiagnosticGroups.td:108
+def Undefined : DiagGroup<"undef">;
+def UndefinedPrefix : DiagGroup<"undef-prefix", [Undefined]>;
def UnsupportedNan : DiagGroup<"unsupported-nan">;
It seems like you
ributzka added inline comments.
Comment at: clang/include/clang/Driver/Options.td:475
+ Alias,
+ HelpText<"Aliased to '-Wundef-prefix=\"\"', enable warnings for undefined
macros">;
def Wwrite_strings : Flag<["-"], "Wwrite-strings">, Group,
Flags<[CC1Option, HelpHidden]>;
---
zixuw created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
zixuw added reviewers: ributzka, steven_wu, cishida, bruno, arphaman.
Herald added a subscriber: dexonsmith.
zixuw edited the summary of this revision.
- Add an `-Wundef-prefix=,...` option, which i
15 matches
Mail list logo