2009-12-15 23:14:24 +03:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2009-10-14 03:27:22 +04:00
|
|
|
|
|
|
|
// PR3990
|
|
|
|
namespace N {
|
|
|
|
struct Wibble {
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef Wibble foo;
|
|
|
|
}
|
|
|
|
using namespace N;
|
|
|
|
|
2010-03-10 14:27:22 +03:00
|
|
|
foo::bar x; // expected-error{{no type named 'bar' in 'N::Wibble'}}
|
2009-10-14 03:27:22 +04:00
|
|
|
|
|
|
|
void f() {
|
2010-03-10 14:27:22 +03:00
|
|
|
foo::bar = 4; // expected-error{{no member named 'bar' in 'N::Wibble'}}
|
2009-10-14 03:27:22 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
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'}}
|