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