[PATCH] D98433: [clang] [C++2b] [P1102] Accept lambdas without parameter list ().
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 16 01:55:18 PDT 2021
curdeius added a comment.
Thank you for the review Aaron. I hope having addressed your comments so far.
I'm not sure for the prototype scope though.
================
Comment at: clang/lib/Parse/ParseExprCXX.cpp:1440
+ } else if (getLangOpts().CPlusPlus2b) {
+ ParseScope PrototypeScope(this, Scope::FunctionPrototypeScope |
+ Scope::FunctionDeclarationScope |
----------------
aaron.ballman wrote:
> I don't know the answer to this, but... do we need a prototype scope at all when there's no parameter list? The old code was doing this, so I don't think this is an issue with your patch per se, more just curiosity whether this is necessary in this case.
I'm not really familiar with clang (I usually work with other parts of LLVM), but at least in the current implementation (before this patch) the prototype scope englobes the parsing of lambda-specifiers, so I found it logical to keep it the same way.
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