[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 10 08:04:50 PDT 2024


================
@@ -18750,18 +18809,21 @@ static void buildLambdaCaptureFixit(Sema &Sema, LambdaScopeInfo *LSI,
   }
 }
 
+static auto skipRequiresBody(DeclContext *DC) {
+  while (DC->isRequiresExprBody())
+    DC = DC->getParent();
+  return DC;
+}
+
----------------
zyn0217 wrote:

We could move it to `tryCaptureVariable`, inlining it as a lambda to avoid such small functions.

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


More information about the cfe-commits mailing list