From d2386ab6adc2b5c4adc4302af3ffc6c14d46fa37 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Thu, 2 Dec 2021 17:06:18 +0000 Subject: [PATCH] Using make_unique instead of `new` (NFC) Fix a clang-tidy warning. --- mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp b/mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp index 4f2c5d554cc2..499c33034444 100644 --- a/mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp +++ b/mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp @@ -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(std::move(diag)); }); }