Lines Matching full:new
1 // RUN: %check_clang_tidy -std=c++14 %s bugprone-unhandled-exception-at-new %t -- -- -fexceptions
13 void *operator new(std::size_t, const std::nothrow_t &) noexcept;
14 void *operator new(std::size_t, std::align_val_t, const std::nothrow_t &) noexcept;
15 void *operator new(std::size_t, void *) noexcept;
22 void *operator new(std::size_t, int, int);
23 void *operator new(std::size_t, int, int, int) noexcept;
26 void *operator new(std::size_t);
27 void *operator new(std::size_t, std::align_val_t);
28 void *operator new(std::size_t, int, int) noexcept;
29 void *operator new(std::size_t, int, int, int);
33 int *I1 = new int; in f1()
34 …CHECK-MESSAGES: :[[@LINE-1]]:13: warning: missing exception handler for allocation failure at 'new' in f1()
36 int *I2 = new int; in f1()
38 int *I3 = new int; in f1()
45 int *I = new int; in f1()
50 int *I = new int; in f1()
55 int *I = new int; in f1()
60 int *I = new int; in f1()
65 int *I = new int; in f1()
70 int *I = new int; in f1()
75 int *I = new int; in f1()
80 int *I = new int; in f1()
81 …CHECK-MESSAGES: :[[@LINE-1]]:14: warning: missing exception handler for allocation failure at 'new' in f1()
86 int *I = new int; in f1()
87 …CHECK-MESSAGES: :[[@LINE-1]]:14: warning: missing exception handler for allocation failure at 'new' in f1()
94 int *I = new int; in f2()
100 int *I = new int; in f2()
105 int *I = new int; in f2()
110 int *I = new int; in f2()
111 …CHECK-MESSAGES: :[[@LINE-1]]:14: warning: missing exception handler for allocation failure at 'new' in f2()
117 int *I1 = new (std::nothrow) int; in f_new_nothrow()
118 int *I2 = new (static_cast<std::align_val_t>(1), std::nothrow) int; in f_new_nothrow()
123 int *I = new (buf) int; in f_new_placement()
127 int *I1 = new (1, 2) int; in f_new_user_defined()
128 …CHECK-MESSAGES: :[[@LINE-1]]:13: warning: missing exception handler for allocation failure at 'new' in f_new_user_defined()
129 int *I2 = new (1, 2, 3) int; in f_new_user_defined()
133 ClassSpecificNew *N1 = new ClassSpecificNew; in f_class_specific()
134 …CHECK-MESSAGES: :[[@LINE-1]]:26: warning: missing exception handler for allocation failure at 'new' in f_class_specific()
135 ClassSpecificNew *N2 = new (static_cast<std::align_val_t>(1)) ClassSpecificNew; in f_class_specific()
136 …CHECK-MESSAGES: :[[@LINE-1]]:26: warning: missing exception handler for allocation failure at 'new' in f_class_specific()
137 ClassSpecificNew *N3 = new (1, 2) ClassSpecificNew; in f_class_specific()
138 ClassSpecificNew *N4 = new (1, 2, 3) ClassSpecificNew; in f_class_specific()
139 …CHECK-MESSAGES: :[[@LINE-1]]:26: warning: missing exception handler for allocation failure at 'new' in f_class_specific()
143 int *I = new int; in f_est_none()
147 int *I = new int; in f_est_noexcept_false()
151 int *I = new int; in f_est_noexcept_true()
152 …CHECK-MESSAGES: :[[@LINE-1]]:12: warning: missing exception handler for allocation failure at 'new' in f_est_noexcept_true()
156 int *I = new int; in f_est_dynamic_none()
157 …CHECK-MESSAGES: :[[@LINE-1]]:12: warning: missing exception handler for allocation failure at 'new' in f_est_dynamic_none()
161 int *I = new int; in f_est_dynamic_1()
166 int *I = new int; in f_est_dynamic_2()
170 int *I = new int; in f_try()
175 int *I = new int; in f_try_bad()
176 …CHECK-MESSAGES: :[[@LINE-1]]:12: warning: missing exception handler for allocation failure at 'new' in f_try_bad()
183 int *I = new int; in f_embedded_try()
192 int *I = new int; in f_est_noexcept_dependent_unused()
197 int *I = new int; in f_est_noexcept_dependent_used()
198 …CHECK-MESSAGES: :[[@LINE-1]]:12: warning: missing exception handler for allocation failure at 'new' in f_est_noexcept_dependent_used()
203 T *X = new T; in f_dependent_new()