================
@@ -372,6 +383,38 @@ maybeDropCxxExplicitObjectParameters(ArrayRef<const 
ParmVarDecl *> Params) {
   return Params;
 }
 
+llvm::StringRef getLambdaCaptureName(const LambdaCapture &Capture) {
+  switch (Capture.getCaptureKind()) {
+  case LCK_This:
+  case LCK_StarThis:
+    return llvm::StringRef{"this"};
+  case LCK_ByCopy:
+  case LCK_ByRef:
+  case LCK_VLAType:
----------------
HighCommander4 wrote:

I'm not exactly sure what a VLA capture is, but looking at the usage, e.g. its 
construction 
[here](https://searchfox.org/llvm/rev/60ed1043d76554a48f66fc0c15fb97ac8b3af7b0/clang/lib/Sema/SemaLambda.cpp#2179)
 with `Var = nullptr`, and [this 
assertion](https://searchfox.org/llvm/rev/60ed1043d76554a48f66fc0c15fb97ac8b3af7b0/clang/lib/AST/ExprCXX.cpp#1240),
 it's not valid to call `getCapturedVar()` for it.

https://github.com/llvm/llvm-project/pull/95712
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to