================ @@ -107,6 +107,7 @@ class ASTUnit { private: std::unique_ptr<LangOptions> LangOpts; + std::shared_ptr<DiagnosticOptions> DiagOpts; ---------------- cor3ntin wrote: Can that be unique_ptr ? https://github.com/llvm/llvm-project/pull/139584