This revision was automatically updated to reflect the committed changes.
Closed by commit rG742970920b7a: [Clang] Implement CWG2358 Explicit capture of
value (authored by cor3ntin).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137172/new/
https://
cor3ntin added inline comments.
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:107-111
+if (const auto *BD = dyn_cast(Decl))
+ VD = dyn_cast_if_present(BD->getDecomposedDecl());
+else
+ VD = dyn_cast(Decl);
+if (VD) {
aaron.ballman wrote:
> cor3
aaron.ballman accepted this revision.
aaron.ballman added a reviewer: clang-language-wg.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
Adding the language WG in case there are reviews coming from the peanut
gallery. Please wait a day before landing just in
cor3ntin updated this revision to Diff 472637.
cor3ntin added a comment.
Fix tests
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137172/new/
https://reviews.llvm.org/D137172
Files:
clang/docs/ReleaseNotes.rst
clang/lib/Sema/SemaDeclCXX.cpp
c
cor3ntin added inline comments.
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:107-111
+if (const auto *BD = dyn_cast(Decl))
+ VD = dyn_cast_if_present(BD->getDecomposedDecl());
+else
+ VD = dyn_cast(Decl);
+if (VD) {
Note that https://reviews.l
cor3ntin updated this revision to Diff 472601.
cor3ntin added a comment.
Properly handle structured bindings in init capture
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137172/new/
https://reviews.llvm.org/D137172
Files:
clang/docs/ReleaseNote
aaron.ballman added inline comments.
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:162
+// Init captures are always VarDecl.
+auto *D = cast(LC.getCapturedVar());
+Invalid |= Visit(D->getInit());
aaron.ballman wrote:
> Can you add a test case showing wha
aaron.ballman added inline comments.
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:162
+// Init captures are always VarDecl.
+auto *D = cast(LC.getCapturedVar());
+Invalid |= Visit(D->getInit());
Can you add a test case showing what happens with structur
cor3ntin updated this revision to Diff 472386.
cor3ntin added a comment.
Fix tests + address aaron's feedback
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137172/new/
https://reviews.llvm.org/D137172
Files:
clang/docs/ReleaseNotes.rst
clang/l
aaron.ballman added a comment.
Precommit CI seems to have caught valid failures this time.
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:152
bool CheckDefaultArgumentVisitor::VisitLambdaExpr(const LambdaExpr *Lambda) {
- // C++11 [expr.lambda.prim]p13:
- // A lambda-expressio
cor3ntin created this revision.
Herald added a project: All.
cor3ntin requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137172
Files:
clang/docs/ReleaseNotes.rst
clang/lib/
11 matches
Mail list logo