[lld][WebAssembly] Reinstate mistakenly disabled test. NFC
[llvm-project.git] / clang / test / Parser / using-template.cpp
blob686873d60b8492d69ab3a03ff4a2916d185b8956
1 // RUN: %clang_cc1 %s -verify
3 namespace N1 {
4 template <typename... Ts>
5 struct Foo {
6 template <typename T>
7 struct Bar {
8 static constexpr bool is_present = false;
9 };
12 template <typename T, typename... Ts>
13 struct Foo<T, Ts...> : public Foo<Ts...> {
14 using template Foo<Ts...>::Bar;
15 // expected-error@-1 {{'template' keyword not permitted after 'using' keyword}}
19 namespace N2 {
20 namespace foo {
21 using I = int;
23 using template namespace foo;
24 // expected-error@-1 {{'template' keyword not permitted after 'using' keyword}}
25 using template template namespace foo;
26 // expected-error@-1 2{{'template' keyword not permitted after 'using' keyword}}
27 I i;
30 namespace N3 {
31 namespace foo {
32 using I = int;
34 using template foo::I;
35 // expected-error@-1 {{'template' keyword not permitted after 'using' keyword}}
36 I i;
39 namespace N4 {
40 template <typename T>
41 class A {};
43 template <typename T>
44 using B = A<T>;
45 B<int> b;
47 using template <typename T> C = A<T>;
48 // expected-error@-1 {{'template' keyword not permitted after 'using' keyword}}
49 // expected-error@-2 {{expected unqualified-id}}
50 C<int> c;
51 // expected-error@-1 {{no template named 'C'}}