John McCall | 9c82afc | 2010-04-20 02:18:25 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
2 | |||||
3 | // Various tests for -fno-exceptions | ||||
4 | |||||
5 | typedef __SIZE_TYPE__ size_t; | ||||
6 | |||||
7 | namespace test0 { | ||||
8 | // rdar://problem/7878149 | ||||
9 | class Foo { | ||||
10 | public: | ||||
11 | void* operator new(size_t x); | ||||
12 | private: | ||||
13 | void operator delete(void *x); | ||||
14 | }; | ||||
15 | |||||
16 | void test() { | ||||
17 | // Under -fexceptions, this does access control for the associated | ||||
18 | // 'operator delete'. | ||||
19 | (void) new Foo(); | ||||
20 | } | ||||
21 | } |