aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx-typeof.cpp
blob: 1ec6e29b1311f73812edcf3725c906791a5ddd65 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
// RUN: %clang_cc1 -fsyntax-only -verify %s

static void test() {
  int *pi;
  int x;
  typeof pi[x] y; 
}

// Part of rdar://problem/8347416;  from the gcc test suite.
struct S {
  int i;
  __typeof(S::i) foo(); // expected-error {{invalid use of non-static data member 'i'}}
};