1 // Header for PCH test delete.cpp 2 namespace pch_test { 3 struct X { 4 int *a; 5 X(); 6 X(int); XX7 X(bool) 8 : a(new int[1]) { } // expected-note{{allocated with 'new[]' here}} ~XX9 ~X() 10 { 11 delete a; // expected-warning{{'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?}} 12 // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:9-[[@LINE-1]]:9}:"[]" 13 } 14 }; 15 } 16