[clang] [Clang] Instantiate constexpr function when they are needed. (PR #173537)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 2 06:16:15 PST 2026
================
@@ -926,6 +926,13 @@ ASTContext::setExternalSource(IntrusiveRefCntPtr<ExternalASTSource> Source) {
ExternalSource = std::move(Source);
}
+SemaProxy *ASTContext::getSemaProxy() { return SemaProxyPtr.get(); }
+
+void ASTContext::setSemaProxy(std::unique_ptr<SemaProxy> Proxy) {
+ assert((!SemaProxyPtr || !Proxy) && "SemaProxy already set");
+ SemaProxyPtr = std::move(Proxy);
+}
----------------
cor3ntin wrote:
setSemaProxy is only called once, but i inlined getSemaProxy, that might be beneficial indeed!
https://github.com/llvm/llvm-project/pull/173537
More information about the cfe-commits
mailing list