add opensuse toolchain support, patch by Ismail Donmez!
[clang/stm8.git] / test / SemaTemplate / typename-specifier-3.cpp
bloba463d88752c95cd4cf279ef9cf9cd98daeb9126d
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // PR4364
4 template<class T> struct a {
5 T b() {
6 return typename T::x();
8 };
9 struct B {
10 typedef B x;
12 B c() {
13 a<B> x;
14 return x.b();
17 // Some extra tests for invalid cases
18 template<class T> struct test2 { T b() { return typename T::a; } }; // expected-error{{expected '(' for function-style cast or type construction}}
19 template<class T> struct test3 { T b() { return typename a; } }; // expected-error{{expected a qualified name after 'typename'}}