[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

Andreas Fertig via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 6 10:29:16 PST 2024


================
@@ -6898,10 +6898,18 @@ class Sema final {
                                    BinaryOperatorKind Operator);
 
   //// ActOnCXXThis -  Parse 'this' pointer.
-  ExprResult ActOnCXXThis(SourceLocation loc);
+  ///
+  /// \param SkipLambdaCaptureCheck Whether to skip the 'this' check for a
+  /// lambda because 'this' is the lambda's 'this'-pointer.
+  ExprResult ActOnCXXThis(SourceLocation loc,
+                          bool SkipLambdaCaptureCheck = false);
----------------
andreasfertig wrote:

It would require invert the logic in the code but state that the `this'- pointer that `ActOnCXXThis` handles is the lambda's own `this` and not the one from the lambda's surrounding scope. I don't know a more CWG wording term for the lambdas `this`- pointer.

https://github.com/llvm/llvm-project/pull/84193


More information about the cfe-commits mailing list