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

struct A {
  void operator delete(size_t) {
    (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}}
  }
};