[PATCH] D98433: [clang] [C++2b] [P1102] Accept lambdas without parameter list ().
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 22 05:45:52 PDT 2021
aaron.ballman added inline comments.
================
Comment at: clang/lib/Parse/ParseExprCXX.cpp:1445-1461
+ unsigned TokKind = 0;
+ switch (Tok.getKind()) {
+ case tok::kw_mutable: TokKind = 0; break;
+ case tok::arrow: TokKind = 1; break;
+ case tok::kw___attribute:
+ case tok::kw___private:
+ case tok::kw___global:
----------------
curdeius wrote:
> Is this really needed? May I simplify remove this switch and just have a generic warning message?
I think a generic diagnostic would be reasonable. I think `lambda without a parameter clause is a C++2b extension` would be sufficiently clear.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98433/new/
https://reviews.llvm.org/D98433
More information about the cfe-commits
mailing list