summaryrefslogtreecommitdiff
path: root/clang/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp
blob: e00e9486f0bfa9b080ed25def74650d5bee6e6eb (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
// RUN: %clang_cc1 -fsyntax-only -verify %s

struct A {
  void operator delete(void*);
};

namespace NS {
  void operator delete(void *); // expected-error {{'operator delete' cannot be declared inside a namespace}}
}

static void operator delete(void *); // expected-error {{'operator delete' cannot be declared static in global scope}}