[PATCH] D123909: [Clang] Use of decltype(capture) in parameter-declaration-clause
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 18 05:38:26 PDT 2022
aaron.ballman added a comment.
We should probably add a release note that says we partially implement CWG 2569 (just the `decltype` portion) and that the core issue has not yet been approved by WG21 but the changes are needed to keep libstdc++ working.
================
Comment at: clang/lib/Parse/ParseExprCXX.cpp:710
+ /*TemplateKWLoc=*/nullptr, Name))
+ return ExprError();
+ return Actions.ActOnMutableAgnosticIdExpression(getCurScope(), SS, Name);
----------------
Sorry, I forgot to mention this before, but there should be some test coverage for this case to make sure the behavior is still reasonable. Something like:
```
void whatever() {
[=]<typename T = decltype(b)>(){};
}
```
(I'd expect we get some sort of lookup error for `b`.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123909/new/
https://reviews.llvm.org/D123909
More information about the cfe-commits
mailing list