blob: 8939fd51570918fafd26f18a453eb1ded60d13fa [file] [log] [blame]
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -verify -fsyntax-only
Steve Naroffeaaae462007-12-16 21:42:28 +00002
3struct simple { int i; };
4
5void f(void) {
6 struct simple s[1];
7 s->i = 1;
8}
9
Douglas Gregor82ac25e2009-01-08 20:45:30 +000010typedef int x;
11struct S {
12 int x;
13 x z;
14};
15
16void g(void) {
17 struct S s[1];
18 s->x = 1;
19 s->z = 2;
20}
Kaelyn Uhrainbd6ddaa2013-10-31 20:32:56 +000021
22int PR17762(struct simple c) {
23 return c->i; // expected-error {{member reference type 'struct simple' is not a pointer; maybe you meant to use '.'?}}
24}