1 // RUN: %check_clang_tidy %s modernize-make-unique %t -- \
2 // RUN:   -config="{CheckOptions: \
3 // RUN:     [{key: modernize-make-unique.MakeSmartPtrFunction, \
4 // RUN:       value: 'my::MakeUnique'}, \
5 // RUN:      {key: modernize-make-unique.MakeSmartPtrFunctionHeader, \
6 // RUN:       value: 'make_unique_util.h'} \
7 // RUN:     ]}" \
8 // RUN:   -- -I %S/Inputs/modernize-smart-ptr
9 
10 #include "unique_ptr.h"
11 // CHECK-FIXES: #include "make_unique_util.h"
12 
f()13 void f() {
14   std::unique_ptr<int> P1 = std::unique_ptr<int>(new int());
15   // CHECK-MESSAGES: :[[@LINE-1]]:29: warning: use my::MakeUnique instead
16   // CHECK-FIXES: std::unique_ptr<int> P1 = my::MakeUnique<int>();
17 }
18