rsmith added a comment.

This is effectively reverting https://reviews.llvm.org/D1783. If we don't need 
that any more for whatever reason, can we also get rid of the check for whether 
the outermost lambda has a mangling number a few lines above? (Please also 
check if we can remove `getOutermostEnclosingLambda`, which was added for this 
purpose.)



================
Comment at: clang/lib/AST/Decl.cpp:1416-1417
         return getLVForClosure(
-                  OuterMostLambda->getDeclContext()->getRedeclContext(),
-                  OuterMostLambda->getLambdaContextDecl(), computation);
+                  Record->getDeclContext()->getRedeclContext(),
+                  Record->getLambdaContextDecl(), computation);
       }
----------------
hliao wrote:
> The code is still inconsistent with the comment. `Record` is the lambda 
> itself instead of the parent of the lambda.
`Record->getDeclContext()` returns the parent of the lambda.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73701



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to