xref: /minix3/external/bsd/llvm/dist/clang/test/SemaCXX/delete.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify %s
2*f4a2713aSLionel Sambuc // RUN: cp %s %t
3*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fixit -x c++ %t
4*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -E -o - %t | FileCheck %s
5*f4a2713aSLionel Sambuc 
f(int a[10][20])6*f4a2713aSLionel Sambuc void f(int a[10][20]) {
7*f4a2713aSLionel Sambuc   // CHECK: delete[] a;
8*f4a2713aSLionel Sambuc   delete a; // expected-warning {{'delete' applied to a pointer-to-array type}}
9*f4a2713aSLionel Sambuc }
10