Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Argyrios Kyrtzidis | 0f07203 | 2008-09-05 11:26:19 +0000 | [diff] [blame] | 2 | |
3 | static void test() { | ||||
4 | int *pi; | ||||
5 | int x; | ||||
6 | typeof pi[x] y; | ||||
7 | } | ||||
John McCall | 124300e | 2010-08-24 23:41:43 +0000 | [diff] [blame^] | 8 | |
9 | // Part of rdar://problem/8347416; from the gcc test suite. | ||||
10 | struct S { | ||||
11 | int i; | ||||
12 | __typeof(S::i) foo(); // expected-error {{invalid use of nonstatic data member 'i'}} | ||||
13 | }; |