[PATCH] D154262: [clang][Interp] LambdaThisCaptures

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 4 07:55:20 PDT 2023


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM aside from a request for some comments.



================
Comment at: clang/lib/AST/Interp/ByteCodeEmitter.h:76
   llvm::DenseMap<const ValueDecl *, std::pair<unsigned, bool>> LambdaCaptures;
-  unsigned LambdaThisCapture;
+  unsigned LambdaThisCapture = 0;
   /// Local descriptors.
----------------
Some comments explaining what this member represents would be helpful.


================
Comment at: clang/lib/AST/Interp/EvalEmitter.h:82
   llvm::DenseMap<const ValueDecl *, std::pair<unsigned, bool>> LambdaCaptures;
-  unsigned LambdaThisCapture;
+  unsigned LambdaThisCapture = 0;
   /// Local descriptors.
----------------
Comments would also help here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154262



More information about the cfe-commits mailing list