diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Parser/cxx-concept-declaration.cpp | 4 | ||||
| -rw-r--r-- | clang/test/SemaCXX/cxx-concept-declaration.cpp | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/clang/test/Parser/cxx-concept-declaration.cpp b/clang/test/Parser/cxx-concept-declaration.cpp index 591629ca285..fad5975e4a9 100644 --- a/clang/test/Parser/cxx-concept-declaration.cpp +++ b/clang/test/Parser/cxx-concept-declaration.cpp @@ -25,6 +25,4 @@ template<typename T> concept concept bool C6 = true; // expected-warning {{dupli template<typename T> concept concept bool C7() { return true; } // expected-warning {{duplicate 'concept' declaration specifier}} -concept D1 = true; // expected-error {{C++ requires a type specifier for all declarations}} - -template<concept T> concept bool D2 = true; // expected-error {{unknown type name 'T'}} +template<concept T> concept bool D1 = true; // expected-error {{unknown type name 'T'}} diff --git a/clang/test/SemaCXX/cxx-concept-declaration.cpp b/clang/test/SemaCXX/cxx-concept-declaration.cpp index 6bc2d482dcb..f9878bc5812 100644 --- a/clang/test/SemaCXX/cxx-concept-declaration.cpp +++ b/clang/test/SemaCXX/cxx-concept-declaration.cpp @@ -15,3 +15,7 @@ struct B { struct C { template<typename T> static concept bool D3 = true; // expected-error {{concept declarations may only appear in namespace scope}} }; + +concept bool D4() { return true; } // expected-error {{'concept' can only appear on the definition of a function template or variable template}} + +concept bool D5 = true; // expected-error {{'concept' can only appear on the definition of a function template or variable template}} |

