Debian Codegraph @

clang-tools-extra/test/clang-tidy/checkers/modernize/make-unique-cxx11.cpp

raw
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
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 }