[PATCH] D137172: [Clang] Implement CWG2358 Explicit capture of value

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 2 10:57:48 PDT 2022


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 case.



================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:107-111
+    if (const auto *BD = dyn_cast<BindingDecl>(Decl))
+      VD = dyn_cast_if_present<VarDecl>(BD->getDecomposedDecl());
+    else
+      VD = dyn_cast<VarDecl>(Decl);
+    if (VD) {
----------------
cor3ntin wrote:
> Note that https://reviews.llvm.org/D137244 introduces a utility to do that, but i''d rather avoid having to many dependencies between these patches. 
So the plan is to land this change, then in D137244 change this usage to the helper function introduced by that patch?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137172/new/

https://reviews.llvm.org/D137172



More information about the cfe-commits mailing list