Home | History | Annotate | Download | only in SemaCXX

Lines Matching full:with

4 // Test with PCH
14 int *a = new int[5]; // expected-note4 {{allocated with 'new[]' here}}
21 delete a; // expected-warning {{'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?}}
22 delete b; // expected-warning {{'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?}}
23 delete[] c; // expected-warning {{'delete[]' applied to a pointer that was allocated with 'new'; did you mean 'delete'?}}
30 delete a; // expected-warning {{'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?}}
31 delete b; // expected-warning {{'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?}}
35 : b(new int[1]), c(new int) {} // expected-note3 {{allocated with 'new[]' here}}
36 // expected-note@-1 {{allocated with 'new' here}}
39 : b(new int[i]), c(new int) {} // expected-note3 {{allocated with 'new[]' here}}
40 // expected-note@-1 {{allocated with 'new' here}}
44 delete a; // expected-warning {{'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?}}
47 int *S::d = new int[42]; // expected-note {{allocated with 'new[]' here}}
49 int *a = new int[1]; // expected-note {{allocated with 'new[]' here}}
50 delete a; // expected-warning {{'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?}}
51 delete s->a; // expected-warning {{'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?}}
52 delete s->b; // expected-warning {{'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?}}
55 delete S::d; // expected-warning {{'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?}}
58 // At least one constructor initializes field with matching form of 'new'.
93 InitList(unsigned c) : p(new derived[c]), p4(nullptr) {} // expected-note {{allocated with 'new[]' here}}
94 InitList(unsigned c, unsigned) : p{new derived[c]}, p4{nullptr} {} // expected-note {{allocated with 'new[]' here}}
96 delete p; // expected-warning {{'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?}}
109 int *a = new int(5); // expected-note2 {{allocated with 'new' here}}
110 delete[] a; // expected-warning {{'delete[]' applied to a pointer that was allocated with 'new'; did you mean 'delete'?}}
113 int *c{new int}; // expected-note {{allocated with 'new' here}}
114 int *d{new int[1]}; // expected-note2 {{allocated with 'new[]' here}}
115 delete [ ] c; // expected-warning {{'delete[]' applied to a pointer that was allocated with 'new'; did you mean 'delete'?}}
117 delete d; // expected-warning {{'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?}}
119 DELETE_ARRAY(a); // expected-warning {{'delete[]' applied to a pointer that was allocated with 'new'; did you mean 'delete'?}}
120 DELETE(d); // expected-warning {{'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?}}
141 : a(new int[1]) // expected-note{{allocated with 'new[]' here}}
144 : a(new int[i]) // expected-note{{allocated with 'new[]' here}}