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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 9 08:23:48 PST 2023


aaron.ballman added inline comments.


================
Comment at: clang/lib/AST/DeclCXX.cpp:3232
+VarDecl *ValueDecl::getPotentiallyDecomposedVarDecl() {
+  assert((isa<VarDecl>(this) || isa<BindingDecl>(this)) &&
+         "expected a VarDecl or a BindingDecl");
----------------
cor3ntin wrote:
> aaron.ballman wrote:
> > 
> That's future tech, `assert` would part that as 2 macros arguments!
Ugh.

`(isa<VarDecl, BindingDecl>(this)) && ...`

should suppress that problem, right? I don't feel strongly though.


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