1 // RUN: %clang_cc1 -fsyntax-only -verify -fexceptions %s
2 typedef __SIZE_TYPE__
size_t;
4 // Operator delete template for placement new with global lookup
9 static void* operator new(size_t) {
10 return I
; // expected-error{{cannot initialize}}
13 static void operator delete(void*) {
14 int *ip
= I
; // expected-error{{cannot initialize}}
19 // Using the global operator new suppresses the search for a
20 // operator delete in the class.
23 new X0
<3>; // expected-note 2{{instantiation}}
26 // Operator delete template for placement new[] with global lookup
31 static void* operator new[](size_t) {
32 return I
; // expected-error{{cannot initialize}}
35 static void operator delete[](void*) {
36 int *ip
= I
; // expected-error{{cannot initialize}}
41 // Using the global operator new suppresses the search for a
42 // operator delete in the class.
45 new X1
<3> [17]; // expected-note 2{{instantiation}}