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