[PATCH] D122768: [Clang][C++20] Support capturing structured bindings in lambdas

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 29 07:54:37 PDT 2022


erichkeane added inline comments.


================
Comment at: clang/test/CodeGenCXX/cxx20-decomposition.cpp:26
+// CHECK: %{{.*}} = load ptr, {{.*}}
+// CHECK: %{{.*}} = load i32, {{.*}}
+// CHECK: %{{.*}} = getelementptr {{.*}}, i32 0, i32 0
----------------
cor3ntin wrote:
> erichkeane wrote:
> > cor3ntin wrote:
> > > erichkeane wrote:
> > > > Which is the important lines here?  You might want to use the `[[NAME:.whatever]]`  (then on the 'other' side: `[[NAME]]`)syntax in here to make sure that the check-lines don't find something else.
> > > > 
> > > > You also likely want to use `.+` to make sure there is actually a character in there.
> > > > 
> > > > 
> > > I'm trying to show i is captured by value and j isn't
> > Hmm... I don't think it is testing what you think you're testing, particularly with so many unnamed checks.  If you send me the IR that this produces and highlight which are the 'important' lines, I can help write this for you.
> To be perfectly honest, I'm neither confident about which lines are important, nor whether the test case is as meaningful as it can be.
> I'm happy to mail you the IR if you have time to look at it :)
Yep, feel free, I'll take a look when I get a chance.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122768



More information about the cfe-commits mailing list