summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/special/class.free/p6.cpp
blob: 555d4e9cfa944a2ae83475305e77648ed4d2579c (plain)
1
2
3
4
5
6
7
8
9
10
11
// RUN: %clang_cc1 -fsyntax-only -verify %s
#include <stddef.h>

struct A {
  void operator delete(void*) {
    (void)this; // expected-error {{invalid use of 'this' outside of a nonstatic member function}}
  }
  void operator delete[](void*) {
    (void)this; // expected-error {{invalid use of 'this' outside of a nonstatic member function}}
  }
};
OpenPOWER on IntegriCloud