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

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 6 00:44:31 PST 2024


================
@@ -7946,6 +7980,8 @@ class Sema final : public SemaBase {
   /// A stack of expression evaluation contexts.
   SmallVector<ExpressionEvaluationContextRecord, 8> ExprEvalContexts;
 
+  SmallVector<Decl *, 8> PendingLazyContextDecls;
----------------
zyn0217 wrote:

So from a quick reading, PendingLazyContextDecls is used for lambdas created as part of other declarations, such as being part of a default argument for a template parameter. Their context declarations are updated only at the end of the evaluation context or right after the outer declaration is created.

I think we'd better document its intent, wdyt?

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


More information about the cfe-commits mailing list