[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / Parser / cxx-template-template-recovery.cpp
blob1230c86d924ff8640564e087a43b3498ca6544f0
1 // RUN: %clang_cc1 -std=c++20 -verify -fsyntax-only %s
3 namespace a {
4 template <typename T>
5 concept C1 = true; // #C1
7 template <typename T>
8 auto V1 = true; // #V1
10 namespace b {
11 template <typename T>
12 concept C2 = true; // #C2
13 template <typename T>
14 auto V2 = true; // #V2
18 template <typename T>
19 concept C3 = true; // #C3
20 template <typename T>
21 auto V3 = true; // #V3
22 template <template <typename T> typename C>
23 constexpr bool test = true;
25 static_assert(test<a::C1>); // expected-error {{too few template arguments for concept 'C1'}} \
26 // expected-note@#C1 {{here}}
27 static_assert(test<a::b::C2>); // expected-error {{too few template arguments for concept 'C2'}} \
28 // expected-note@#C2 {{here}}
29 static_assert(test<C3>); // expected-error {{too few template arguments for concept 'C3'}} \
30 // expected-note@#C3 {{here}}
32 static_assert(test<a::V1>); // expected-error {{use of variable template 'V1' requires template arguments}} \
33 // expected-note@#V1 {{here}}
34 static_assert(test<a::b::V2>); // expected-error {{use of variable template 'V2' requires template arguments}} \
35 // expected-note@#V2 {{here}}
36 static_assert(test<V3>); // expected-error {{use of variable template 'V3' requires template arguments}} \
37 // expected-note@#V3 {{here}}
40 void f() {
41 C3 t1 = 0; // expected-error {{expected 'auto' or 'decltype(auto)' after concept name}}
42 a::C1 t2 = 0; // expected-error {{expected 'auto' or 'decltype(auto)' after concept name}}
43 a::b::C2 t3 = 0; // expected-error {{expected 'auto' or 'decltype(auto)' after concept name}}