File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
clang/include/clang/Frontend Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,10 @@ class ClangTidyPluginAction : public PluginASTAction {
4040 // Create and set diagnostics engine
4141 auto *DiagConsumer =
4242 new ClangTidyDiagnosticConsumer (*Context, &Compiler.getDiagnostics ());
43+ auto DiagOpts = std::make_unique<DiagnosticOptions>();
4344 auto DiagEngine = std::make_unique<DiagnosticsEngine>(
44- new DiagnosticIDs, new DiagnosticOptions , DiagConsumer);
45- Context->setDiagnosticsEngine (DiagEngine.get ());
45+ new DiagnosticIDs, *DiagOpts , DiagConsumer);
46+ Context->setDiagnosticsEngine (std::move (DiagOpts), DiagEngine.get ());
4647
4748 // Create the AST consumer.
4849 ClangTidyASTConsumerFactory Factory (*Context);
Original file line number Diff line number Diff line change @@ -51,7 +51,6 @@ class LogDiagnosticPrinter : public DiagnosticConsumer {
5151 raw_ostream &OS;
5252 std::unique_ptr<raw_ostream> StreamOwner;
5353 const LangOptions *LangOpts;
54- DiagnosticOptions &DiagOpts;
5554
5655 SourceLocation LastWarningLoc;
5756 FullSourceLoc LastLoc;
You can’t perform that action at this time.
0 commit comments