android13/external/clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp

13 lines
465 B
C++

// RUN: %clang_cc1 -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 {{follows non-static declaration}} expected-note {{implicit}}
static void operator delete(void *, int, int); // expected-error {{'operator delete' cannot be declared static in global scope}}