bolt/deps/llvm-18.1.8/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique-cxx11.cpp

10 lines
289 B
C++
Raw Normal View History

2025-02-14 19:21:04 +01:00
// RUN: %check_clang_tidy -std=c++11 %s modernize-make-unique %t -- -- -I %S/Inputs/smart-ptr
#include "unique_ptr.h"
// CHECK-FIXES: #include "unique_ptr.h"
void f() {
auto my_ptr = std::unique_ptr<int>(new int(1));
// CHECK-FIXES: auto my_ptr = std::unique_ptr<int>(new int(1));
}