From 7442d6faa2719e4e7d33a7021c406c5a4facd74d Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 16 Apr 2017 16:02:28 +0000 Subject: Vendor import of clang trunk r300422: https://llvm.org/svn/llvm-project/cfe/trunk@300422 --- .../temp.constr.decl/class-template-decl.cpp | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 test/CXX/concepts-ts/temp/temp.constr/temp.constr.decl/class-template-decl.cpp (limited to 'test/CXX/concepts-ts/temp/temp.constr/temp.constr.decl/class-template-decl.cpp') diff --git a/test/CXX/concepts-ts/temp/temp.constr/temp.constr.decl/class-template-decl.cpp b/test/CXX/concepts-ts/temp/temp.constr/temp.constr.decl/class-template-decl.cpp new file mode 100644 index 000000000000..d1ad0404ef42 --- /dev/null +++ b/test/CXX/concepts-ts/temp/temp.constr/temp.constr.decl/class-template-decl.cpp @@ -0,0 +1,65 @@ +// RUN: %clang_cc1 -std=c++14 -fconcepts-ts -x c++ -verify %s + +namespace nodiag { + +template requires bool(T()) +struct A; +template requires bool(U()) +struct A; + +} // end namespace nodiag + +namespace diag { + +template requires true // expected-note{{previous template declaration is here}} +struct A; +template struct A; // expected-error{{associated constraints differ in template redeclaration}} + +template struct B; // expected-note{{previous template declaration is here}} +template requires true // expected-error{{associated constraints differ in template redeclaration}} +struct B; + +template requires true // expected-note{{previous template declaration is here}} +struct C; +template requires !0 // expected-error{{associated constraints differ in template redeclaration}} +struct C; + +} // end namespace diag + +namespace nodiag { + +struct AA { + template requires someFunc(T()) + struct A; +}; + +template requires someFunc(T()) +struct AA::A { }; + +struct AAF { + template requires someFunc(T()) + friend struct AA::A; +}; + +} // end namespace nodiag + +namespace diag { + +template +struct TA { + template