aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2025-07-31 15:07:35 -0400
committerGitHub <noreply@github.com>2025-07-31 15:07:35 -0400
commitc7f343750744fd0c928b1da67e9dd894a2fe52cf (patch)
tree0e13516db8902e5ab932469e08a7e96a9538e570 /clang/lib/Frontend/CompilerInvocation.cpp
parent1c60b7da4f7af388b12f4f9b1d46bab0b65c5155 (diff)
downloadllvm-c7f343750744fd0c928b1da67e9dd894a2fe52cf.zip
llvm-c7f343750744fd0c928b1da67e9dd894a2fe52cf.tar.gz
llvm-c7f343750744fd0c928b1da67e9dd894a2fe52cf.tar.bz2
NFC: Clean up of IntrusiveRefCntPtr construction from raw pointers. (#151545)
Handles clang::DiagnosticsEngine and clang::DiagnosticIDs. For DiagnosticIDs, this mostly migrates from `new DiagnosticIDs` to convenience method `DiagnosticIDs::create()`. Part of cleanup https://github.com/llvm/llvm-project/issues/151026
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index ab4384a..9f77e62 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -826,7 +826,7 @@ static bool RoundTrip(ParseFn Parse, GenerateFn Generate,
// Setup a dummy DiagnosticsEngine.
DiagnosticOptions DummyDiagOpts;
- DiagnosticsEngine DummyDiags(new DiagnosticIDs(), DummyDiagOpts);
+ DiagnosticsEngine DummyDiags(DiagnosticIDs::create(), DummyDiagOpts);
DummyDiags.setClient(new TextDiagnosticBuffer());
// Run the first parse on the original arguments with the dummy invocation and
@@ -2685,7 +2685,7 @@ bool clang::ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
std::optional<DiagnosticsEngine> IgnoringDiags;
if (!Diags) {
IgnoringDiagOpts.emplace();
- IgnoringDiags.emplace(new DiagnosticIDs(), *IgnoringDiagOpts,
+ IgnoringDiags.emplace(DiagnosticIDs::create(), *IgnoringDiagOpts,
new IgnoringDiagConsumer());
Diags = &*IgnoringDiags;
}