diff options
Diffstat (limited to 'clang/test/SemaCXX/delete.cpp')
-rw-r--r-- | clang/test/SemaCXX/delete.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/delete.cpp b/clang/test/SemaCXX/delete.cpp new file mode 100644 index 0000000..5824fac --- /dev/null +++ b/clang/test/SemaCXX/delete.cpp @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: cp %s %t +// RUN: %clang_cc1 -fixit -x c++ %t +// RUN: %clang_cc1 -E -o - %t | FileCheck %s + +void f(int a[10][20]) { + // CHECK: delete[] a; + delete a; // expected-warning {{'delete' applied to a pointer-to-array type}} +} |