[PATCH] D137244: [Clang] Correctly capture bindings in dependent lambdas.

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 8 11:47:57 PST 2022


cor3ntin added inline comments.


================
Comment at: clang/lib/AST/DeclCXX.cpp:3234-3237
+  if (auto *Var = llvm::dyn_cast<VarDecl>(this))
+    return Var;
+  if (auto *BD = llvm::dyn_cast<BindingDecl>(this))
+    return llvm::dyn_cast<VarDecl>(BD->getDecomposedDecl());
----------------
aaron.ballman wrote:
> No need to use the fully-qualified name (we weren't using it for the calls to `isa` either).
My IDE completion being weird, sorry about that :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137244



More information about the cfe-commits mailing list