[PATCH] D144866: [clang] Fix aggregate initialization inside lambda constexpr
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 27 09:32:08 PST 2023
shafik added a comment.
Thank you for this patch, it looks good.
================
Comment at: clang/lib/AST/ExprConstant.cpp:8763
if (isLambdaCallOperator(Info.CurrentCall->Callee)) {
- // Ensure we actually have captured 'this'. (an error will have
- // been previously reported if not).
+ // Ensure we actually have captured 'this'. If something was wrong with
+ // 'this' capture, the error would have been previously reported.
----------------
It might be worth it to review all the examples here: https://eel.is/c++draft/expr.prim.lambda
and make sure the test we have actually covers all the scenarios. It looks like we capture most of them but I have not gone over them fully.
================
Comment at: clang/test/SemaCXX/lambda-expressions.cpp:673
+ int i;
+ int *p = &i;
+};
----------------
It would be helpful to add a comment about the implicit `this` access.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144866/new/
https://reviews.llvm.org/D144866
More information about the cfe-commits
mailing list