brintos

brintos / llvm-project-archived public Read only

0
0
Text · 484 B · 2440a38 Raw
29 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -verify %s2 3int* f(int);4float *f(...);5 6template<typename T>7struct X {8  typedef typeof(T*) typeof_type;9  typedef typeof(f(T())) typeof_expr;10};11 12int *iptr0;13float *fptr0;14X<int>::typeof_type &iptr1 = iptr0;15 16X<int>::typeof_expr &iptr2 = iptr0;17X<float*>::typeof_expr &fptr1 = fptr0;18 19namespace rdar13094134 {20  template <class>21  class X {22    typedef struct {23      Y *y; // expected-error{{unknown type name 'Y'}}24    } Y; 25  };26 27  X<int> xi;28}29