Using make_unique instead of `new` (NFC)

Fix a clang-tidy warning.
This commit is contained in:
Mehdi Amini 2021-12-02 17:06:18 +00:00
parent dc5e1d06b9
commit d2386ab6ad
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ protected:
// Register a diagnostic handler to capture the diagnostic so that we can
// check it later.
context.getDiagEngine().registerHandler([&](Diagnostic &diag) {
diagnostic.reset(new Diagnostic(std::move(diag)));
diagnostic = std::make_unique<Diagnostic>(std::move(diag));
});
}