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