[Lldb-commits] [clang] [clang-tools-extra] [lldb] [clang] Remove intrusive reference count from `DiagnosticOptions` (PR #139584)
Oliver Hunt via lldb-commits
lldb-commits at lists.llvm.org
Wed May 14 02:44:07 PDT 2025
================
@@ -2032,6 +2032,7 @@ class SourceManagerForFile {
// as they are created in `createSourceManagerForFile` so that they can be
// deleted in the reverse order as they are created.
std::unique_ptr<FileManager> FileMgr;
+ std::unique_ptr<DiagnosticOptions> DiagOpts;
----------------
ojhunt wrote:
I don't like that in some cases we have a unique_ptr<DiagnosticOptions> and later (ATSUnit) we use a shared_ptr<>. It leaves an author unable to know given some arbitrary DiagnosticOptions* what the lifetime and/or ownership rules are.
https://github.com/llvm/llvm-project/pull/139584
More information about the lldb-commits
mailing list