================
@@ -1427,6 +1439,16 @@ class ASTContext : public RefCountedBase<ASTContext> {
/// with this AST context, if any.
ASTMutationListener *getASTMutationListener() const { return Listener; }
+ /// Returns a SemaProxy*, i.e an object through which interact with Sema.
+ /// This will return null, unless setSemaProxy has been called.
+ /// As Sema is only available during parsing, getSemaProxy will return null
+ /// during CodeGen and when using the AST from tooling.
+ SemaProxy *getSemaProxy() { return SemaProxyPtr.get(); }
+
+ /// Set the SemaProxy instance
+ /// This function is called from Sema during the initial parsing of a TU.
+ void setSemaProxy(std::unique_ptr<SemaProxy> Proxy);
----------------
cor3ntin wrote:
There was the idea that there could be other implementer of the interface, for
diagnostic purposes or what not. I would not be opposed though.
https://github.com/llvm/llvm-project/pull/173537
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits