[clang] [Clang] Reconsider the timing of instantiation of local constexpr lambdas (PR #98758)

via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 14 05:00:11 PDT 2024


================
@@ -5340,20 +5341,31 @@ bool Sema::CheckCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD,
 
 struct ImmediateCallVisitor : public RecursiveASTVisitor<ImmediateCallVisitor> {
   const ASTContext &Context;
-  ImmediateCallVisitor(const ASTContext &Ctx) : Context(Ctx) {}
+  llvm::SmallPtrSetImpl<const FunctionDecl *> *ReferencedFunctions;
+
+  ImmediateCallVisitor(const ASTContext &Ctx,
+                       llvm::SmallPtrSetImpl<const FunctionDecl *>
+                           *ReferencedFunctions = nullptr)
+      : Context(Ctx), ReferencedFunctions(ReferencedFunctions) {}
----------------
cor3ntin wrote:

If we are going to reuse this object, we should rename it  - or maybe we need a separate class

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


More information about the cfe-commits mailing list