Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -parse-noop |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 2 | |
3 | // Test the X can be overloaded inside the struct. | ||||
4 | typedef int X; | ||||
5 | struct Y { short X; }; | ||||
6 | |||||
Chris Lattner | f26d510 | 2009-03-24 17:05:27 +0000 | [diff] [blame] | 7 | // Variable shadows type, PR3872 |
8 | |||||
9 | typedef struct foo { int x; } foo; | ||||
10 | void test() { | ||||
11 | foo *foo; | ||||
12 | foo->x = 0; | ||||
13 | } | ||||
14 |