xref: /minix3/external/bsd/llvm/dist/clang/test/CXX/special/class.free/p1.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 #include <stddef.h>
3 
4 struct A {
operator newA5   void *operator new(size_t) {
6     return this; // expected-error {{invalid use of 'this' outside of a non-static member function}}
7   }
operator new[]A8   void *operator new[](size_t) {
9     return this; // expected-error {{invalid use of 'this' outside of a non-static member function}}
10   }
11 };
12