1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -verify %s 2*67e74705SXin Li #include <stddef.h> 3*67e74705SXin Li 4*67e74705SXin Li struct A { operator deleteA5*67e74705SXin Li void operator delete(void*) { 6*67e74705SXin Li (void)this; // expected-error {{invalid use of 'this' outside of a non-static member function}} 7*67e74705SXin Li } operator delete[]A8*67e74705SXin Li void operator delete[](void*) { 9*67e74705SXin Li (void)this; // expected-error {{invalid use of 'this' outside of a non-static member function}} 10*67e74705SXin Li } 11*67e74705SXin Li }; 12