summaryrefslogtreecommitdiffstats
path: root/test/CXX/expr/expr.unary/expr.new/p20-0x.cpp
blob: 4c924b137ccdfe38dd31791d0f3aa5b30167910a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x -fexceptions %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'}}
}