blob: 666595c84f071d5402b7a4c7f2b9c2b8828b8bad [file] [log] [blame]
Shih-wei Liaof8fd82b2010-02-10 11:10:31 -08001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3class X {};
4
5void 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
14void 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}