@@ -67,12 +67,11 @@ class StoringDiagnosticConsumer : public clang::DiagnosticConsumer {
67
67
std::vector<IDAndDiagnostic> m_diagnostics;
68
68
// / The DiagnosticPrinter used for creating the full diagnostic messages
69
69
// / that are stored in m_diagnostics.
70
- std::shared_ptr <clang::TextDiagnosticPrinter> m_diag_printer;
70
+ std::unique_ptr <clang::TextDiagnosticPrinter> m_diag_printer;
71
71
// / Output stream of m_diag_printer.
72
- std::shared_ptr <llvm::raw_string_ostream> m_os;
72
+ std::unique_ptr <llvm::raw_string_ostream> m_os;
73
73
// / Output string filled by m_os. Will be reused for different diagnostics.
74
74
std::string m_output;
75
- Log *m_log;
76
75
// / A Progress with explicitly managed lifetime.
77
76
std::unique_ptr<Progress> m_current_progress_up;
78
77
std::vector<std::string> m_module_build_stack;
@@ -134,12 +133,10 @@ class ClangModulesDeclVendorImpl : public ClangModulesDeclVendor {
134
133
} // anonymous namespace
135
134
136
135
StoringDiagnosticConsumer::StoringDiagnosticConsumer () {
137
- m_log = GetLog (LLDBLog::Expressions);
138
-
139
- clang::DiagnosticOptions *m_options = new clang::DiagnosticOptions ();
140
- m_os = std::make_shared<llvm::raw_string_ostream>(m_output);
136
+ auto *options = new clang::DiagnosticOptions ();
137
+ m_os = std::make_unique<llvm::raw_string_ostream>(m_output);
141
138
m_diag_printer =
142
- std::make_shared <clang::TextDiagnosticPrinter>(*m_os, m_options );
139
+ std::make_unique <clang::TextDiagnosticPrinter>(*m_os, options );
143
140
}
144
141
145
142
void StoringDiagnosticConsumer::HandleDiagnostic (
0 commit comments