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