xref: /llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique-cxx11.cpp (revision 89a1d03e2b379e325daa5249411e414bbd995b5e)
1 // RUN: %check_clang_tidy -std=c++11 %s modernize-make-unique %t -- -- -I %S/Inputs/smart-ptr
2 
3 #include "unique_ptr.h"
4 // CHECK-FIXES: #include "unique_ptr.h"
5 
f()6 void f() {
7   auto my_ptr = std::unique_ptr<int>(new int(1));
8   // CHECK-FIXES: auto my_ptr = std::unique_ptr<int>(new int(1));
9 }
10