[clang] [Clang] Instantiate constexpr function when they are needed. (PR #173537)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 25 02:13:18 PST 2025
================
@@ -1526,13 +1527,30 @@ bool CheckFunctionDecl(InterpState &S, CodePtr OpPC, const FunctionDecl *FD) {
return diagnoseCallableDecl(S, OpPC, FD);
}
-static void compileFunction(InterpState &S, const Function *Func) {
- const FunctionDecl *Definition = Func->getDecl()->getDefinition();
- if (!Definition)
+static void compileFunction(InterpState &S, const Function *Func,
+ SourceLocation Loc) {
----------------
tbaederr wrote:
Pass a `CodePtr` instead of `Loc` and do the `getLocation()` call when needed.
https://github.com/llvm/llvm-project/pull/173537
More information about the cfe-commits
mailing list