opnsense-src/test/SemaCXX/invalid-member-expr.cpp

22 lines
651 B
C++
Raw Normal View History

2010-01-01 05:34:51 -05:00
// RUN: %clang_cc1 -fsyntax-only -verify %s
2009-10-14 14:03:49 -04:00
class X {};
void test() {
X x;
2009-11-04 10:04:32 -05:00
x.int; // expected-error{{expected unqualified-id}}
x.~int(); // expected-error{{expected the class name}}
2009-10-14 14:03:49 -04:00
x.operator; // expected-error{{missing type specifier after 'operator'}}
x.operator typedef; // expected-error{{missing type specifier after 'operator'}}
}
void test2() {
X *x;
2009-11-04 10:04:32 -05:00
x->int; // expected-error{{expected unqualified-id}}
x->~int(); // expected-error{{expected the class name}}
2009-10-14 14:03:49 -04:00
x->operator; // expected-error{{missing type specifier after 'operator'}}
x->operator typedef; // expected-error{{missing type specifier after 'operator'}}
}