summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-02-04 01:14:30 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-02-04 01:14:30 +0000
commitbdd146435ff77f63c83823eeec4d763c6fb9a2d8 (patch)
treed61a74713f68cd0623c1ea8e690bc79f74c0e800 /clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation
parent7437589fa186d1f0e58d7528bf9b7351fae5ffdc (diff)
downloadbcm5719-llvm-bdd146435ff77f63c83823eeec4d763c6fb9a2d8.tar.gz
bcm5719-llvm-bdd146435ff77f63c83823eeec4d763c6fb9a2d8.zip
Add implicit declarations of allocation functions when looking them up for
redeclaration, not just when looking them up for a use -- we need the implicit declaration to appropriately check various properties of them (notably, whether they're deleted). llvm-svn: 200729
Diffstat (limited to 'clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation')
-rw-r--r--clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp3
1 files changed, 2 insertions, 1 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
index 8a62ae84e2a..3b77a62ce7d 100644
--- 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
@@ -9,7 +9,8 @@ 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}}
+static void *operator new(size_t); // expected-error {{static declaration of 'operator new' follows non-static declaration}} expected-note {{previous}}
+static void *operator new(size_t, int, int); // expected-error {{'operator new' cannot be declared static in global scope}}
struct B {
void operator new(size_t); // expected-error {{'operator new' must return type 'void *'}}
OpenPOWER on IntegriCloud