Home | History | Annotate | Download | only in SemaCXX
      1 // RUN: %clang_cc1 -fsyntax-only -verify %s
      2 
      3 // PR3990
      4 namespace N {
      5   struct Wibble {
      6   };
      7 
      8   typedef Wibble foo;
      9 }
     10 using namespace N;
     11 
     12 foo::bar x; // expected-error{{no type named 'bar' in 'N::Wibble'}}
     13 
     14 void f() {
     15   foo::bar  = 4; // expected-error{{no member named 'bar' in 'N::Wibble'}}
     16 }
     17 
     18 template<typename T>
     19 struct A {
     20   typedef T type;
     21 
     22   type f();
     23 };
     24 
     25 template<typename T>
     26 A<T>::type g(T t) { return t; } // expected-error{{missing 'typename'}}
     27 
     28 template<typename T>
     29 A<T>::type A<T>::f() { return type(); } // expected-error{{missing 'typename'}}
     30