[clang] [Clang] Instantiate local constexpr functions eagerly (PR #95660)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 15 16:50:11 PDT 2024
================
@@ -18112,7 +18112,8 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func,
if (FirstInstantiation || TSK != TSK_ImplicitInstantiation ||
Func->isConstexpr()) {
- if (isa<CXXRecordDecl>(Func->getDeclContext()) &&
+ if (!Func->isConstexpr() &&
----------------
mizvekov wrote:
Nit: Slight simplification, you might as well move this branch after the `else if (Func->isConstexpr())` below instead of testing it's negation.
https://github.com/llvm/llvm-project/pull/95660
More information about the cfe-commits
mailing list