]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/SemaCXX/unknown-type-name.cpp
Update clang to 84175.
[FreeBSD/FreeBSD.git] / test / SemaCXX / unknown-type-name.cpp
1 // RUN: clang-cc -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 'struct N::Wibble'}}
13
14 void f() {
15   foo::bar  = 4; // expected-error{{no member named 'bar' in 'struct 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'}}