[PATCH] D95644: Ensure that we traverse non-op() method bodys of lambdas

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 28 16:41:23 PST 2021


rsmith added inline comments.


================
Comment at: clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:485
+  A a;
+  auto l = [a] { };
+  auto lCopy = l;
----------------
steveire wrote:
> rsmith wrote:
> > steveire wrote:
> > > I don't know how to create a lambda with a default ctor body.
> > I think that's probably not actually possible, sorry for misleading you on that! You can introduce a copy constructor with a body (by giving `A` a non-trivial copy constructor), though, if you want to test that.
> Thanks! I think I have the copy-ctor case covered already. Is something missing?
Oh, right you are. Looks good :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95644



More information about the cfe-commits mailing list