Shih-wei Liao | f8fd82b | 2010-02-10 11:10:31 -0800 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | |
| 3 | class X {}; |
| 4 | |
| 5 | void test() { |
| 6 | X x; |
| 7 | |
| 8 | x.int; // expected-error{{expected unqualified-id}} |
| 9 | x.~int(); // expected-error{{expected the class name}} |
| 10 | x.operator; // expected-error{{missing type specifier after 'operator'}} |
| 11 | x.operator typedef; // expected-error{{missing type specifier after 'operator'}} |
| 12 | } |
| 13 | |
| 14 | void test2() { |
| 15 | X *x; |
| 16 | |
| 17 | x->int; // expected-error{{expected unqualified-id}} |
| 18 | x->~int(); // expected-error{{expected the class name}} |
| 19 | x->operator; // expected-error{{missing type specifier after 'operator'}} |
| 20 | x->operator typedef; // expected-error{{missing type specifier after 'operator'}} |
| 21 | } |