blob: 5e3d0c0a1bc85f67a52d0ea164d760666d3b718e [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Douglas Gregora6f0f9d2009-08-31 19:52:13 +00002
3class X {
4public:
5 int operator++();
6 operator int();
7};
8
9void test() {
10 X x;
11 int i;
12
13 i = x.operator++();
14 i = x.operator int();
15 x.operator--(); // expected-error{{no member named 'operator--'}}
16 x.operator float(); // expected-error{{no member named 'operator float'}}
17 x.operator; // expected-error{{missing type specifier after 'operator'}}
18}
19
20void test2() {
21 X *x;
22 int i;
23
24 i = x->operator++();
25 i = x->operator int();
26 x->operator--(); // expected-error{{no member named 'operator--'}}
27 x->operator float(); // expected-error{{no member named 'operator float'}}
28 x->operator; // expected-error{{missing type specifier after 'operator'}}
29}