[PATCH] D77633: [Parser] Improve diagnostic and error recovery when C++ keywords are used as identifiers.
Johannes Doerfert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 8 21:02:59 PDT 2020
jdoerfert added a comment.
This is cool, thx!
One case I stumbled upon recently is:
`void explicit() {}`
Which results in these rather confusing messages:
/tmp/test.cpp:1:14: warning: explicit(bool) is a C++20 extension [-Wc++20-extensions]
void explicit() { }
^
/tmp/test.cpp:1:15: error: expected expression
void explicit() { }
^
/tmp/test.cpp:1:17: error: expected unqualified-id
void explicit() { }
^
1 warning and 2 errors generated.
Just in case you want to continue this ;)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77633/new/
https://reviews.llvm.org/D77633
More information about the cfe-commits
mailing list