Lines Matching full:warning
23 delete p; // expected-warning{{Memory allocated by malloc() should be deallocated by free(), not 'delete'}}
29 delete q; // expected-warning{{Memory allocated by realloc() should be deallocated by free(), not 'delete'}}
34 delete p; // expected-warning{{Memory allocated by calloc() should be deallocated by free(), not 'delete'}}
39 delete p; // expected-warning{{Memory allocated by strdup() should be deallocated by free(), not 'delete'}}
44 delete p; // expected-warning{{Memory allocated by my_malloc() should be deallocated by free(), not 'delete'}}
49 operator delete(p); // expected-warning{{Memory allocated by malloc() should be deallocated by free(), not operator delete}}
54 delete[] p; // expected-warning{{Memory allocated by malloc() should be deallocated by free(), not 'delete[]'}}
59 operator delete[](p); // expected-warning{{Memory allocated by malloc() should be deallocated by free(), not operator delete[]}}
64 delete p; // expected-warning{{Memory allocated by alloca() should not be deallocated}}
70 free(p); // expected-warning{{Memory allocated by 'new' should be deallocated by 'delete', not free()}}
75 free(p); // expected-warning{{Memory allocated by operator new should be deallocated by 'delete', not free()}}
80 free(p); // expected-warning{{Memory allocated by 'new[]' should be deallocated by 'delete[]', not free()}}
85 realloc(p, sizeof(long)); // expected-warning{{Memory allocated by 'new' should be deallocated by 'delete', not realloc()}}
90 realloc(p, sizeof(long)); // expected-warning{{Memory allocated by operator new should be deallocated by 'delete', not realloc()}}
95 realloc(p, sizeof(long)); // expected-warning{{Memory allocated by 'new[]' should be deallocated by 'delete[]', not realloc()}}
103 delete[] p; // expected-warning{{Memory allocated by 'new' should be deallocated by 'delete', not 'delete[]'}}
108 delete[] p; // expected-warning{{Memory allocated by operator new should be deallocated by 'delete', not 'delete[]'}}
117 delete p; // expected-warning{{Memory allocated by 'new[]' should be deallocated by 'delete[]', not 'delete'}}
122 delete p; // expected-warning{{Memory allocated by operator new[] should be deallocated by 'delete[]', not 'delete'}}
127 NSData *d = [NSData dataWithBytesNoCopy:p length:sizeof(int) freeWhenDone:1]; // expected-warning{{+dataWithBytesNoCopy:length:freeWhenDone: cannot take ownership of memory allocated by 'new'}}
138 delete &i; // no-warning
141 delete ++p1; // no-warning
145 delete p2; // no-warning
147 int *p3 = new int; // no-warning
153 operator delete(p); // no-warning
159 delete p; // no-warning
165 p = new(p) int; // no-warning
176 free(&i); // no-warning
179 free(++p1); // no-warning
183 free(p2); // no-warning
185 int *p3 = (int *)malloc(sizeof(int)); // no-warning
191 free(p); // no-warning
197 p = new(p) int; // no-warning
209 // expected-warning@-1 {{Memory allocated by 'new[]' should be deallocated by 'delete[]', not 'delete'}}
210 // expected-warning@-2 {{Memory allocated by malloc() should be deallocated by free(), not 'delete'}}
217 } // no-warning
227 } // no-warning