diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-12 00:32:00 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-12 00:32:00 +0000 |
commit | e363c8e1dfe67f20d768aca2397dae248b9839e6 (patch) | |
tree | e3f257e9eb0bacdcc70f64cf8b411ec1818c6405 /clang/test/CXX/basic | |
parent | 22f443f58c0b37fea8727d8d7968df31dfa0a1b8 (diff) | |
download | bcm5719-llvm-e363c8e1dfe67f20d768aca2397dae248b9839e6.tar.gz bcm5719-llvm-e363c8e1dfe67f20d768aca2397dae248b9839e6.zip |
Correctly diagnose [basic.stc.dynamic.allocation]p1
llvm-svn: 91190
Diffstat (limited to 'clang/test/CXX/basic')
-rw-r--r-- | clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp b/clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp new file mode 100644 index 00000000000..f8fd9f2dd50 --- /dev/null +++ b/clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp @@ -0,0 +1,12 @@ +// RUN: clang-cc -fsyntax-only -verify %s +#include <stddef.h> + +struct A { + void *operator new(size_t); +}; + +namespace NS { + void *operator new(size_t);; // expected-error {{'operator new' cannot be declared inside a namespace}} +} + +static void *operator new(size_t); // expected-error {{'operator new' cannot be declared static in global scope}} |