2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc -fsyntax-only -verify %s
|
2008-12-21 07:49:58 +08:00
|
|
|
|
|
|
|
class X{
|
|
|
|
public:
|
|
|
|
enum E {Enumerator};
|
|
|
|
int f();
|
|
|
|
static int mem;
|
|
|
|
static float g();
|
|
|
|
};
|
|
|
|
|
|
|
|
void test(X* xp, X x) {
|
|
|
|
int i1 = x.f();
|
|
|
|
int i2 = xp->f();
|
|
|
|
x.E; // expected-error{{cannot refer to type member 'E' with '.'}}
|
|
|
|
xp->E; // expected-error{{cannot refer to type member 'E' with '->'}}
|
2009-01-16 11:02:29 +08:00
|
|
|
int i3 = x.Enumerator;
|
|
|
|
int i4 = xp->Enumerator;
|
2008-12-21 07:49:58 +08:00
|
|
|
x.mem = 1;
|
|
|
|
xp->mem = 2;
|
|
|
|
float f1 = x.g();
|
|
|
|
float f2 = xp->g();
|
|
|
|
}
|