diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-11 23:23:22 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-11 23:23:22 +0000 |
commit | 12308f41e7e26e091950d868d0d2e00a2892fbf0 (patch) | |
tree | 9e3df94dbf50fafc9333181c3361b84c1a034b44 /clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation | |
parent | f5303fe492116d077e6e1fabbde6f95ffa173010 (diff) | |
download | bcm5719-llvm-12308f41e7e26e091950d868d0d2e00a2892fbf0.tar.gz bcm5719-llvm-12308f41e7e26e091950d868d0d2e00a2892fbf0.zip |
Improve diagnostics for malformed delete operator function declarations.
llvm-svn: 91180
Diffstat (limited to 'clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation')
-rw-r--r-- | clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp b/clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp new file mode 100644 index 00000000000..04af5bc82ec --- /dev/null +++ b/clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp @@ -0,0 +1,11 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +struct A { + void operator delete(void*); +}; + +namespace NS { + void operator delete(void *); // expected-error {{'operator delete' cannot be declared inside a namespace}} +} + +static void operator delete(void *); // expected-error {{'operator delete' cannot be declared static in global scope}} |