blob: c188e1e25e04eb484ec38648959601d155c0210a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s
typedef __SIZE_TYPE__ size_t;
struct S {
// Placement allocation function:
static void* operator new(size_t, size_t);
// Usual (non-placement) deallocation function:
static void operator delete(void*, size_t); // expected-note{{declared here}}
};
void testS() {
S* p = new (0) S; // expected-error{{'new' expression with placement arguments refers to non-placement 'operator delete'}}
}
|