[clang] c825abd - [clang] NFC: introduce test for D126620
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Mon May 30 13:46:05 PDT 2022
Author: Matheus Izvekov
Date: 2022-05-30T22:45:57+02:00
New Revision: c825abd6b0198fb088d9752f556a70705bc99dfd
URL: https://github.com/llvm/llvm-project/commit/c825abd6b0198fb088d9752f556a70705bc99dfd
DIFF: https://github.com/llvm/llvm-project/commit/c825abd6b0198fb088d9752f556a70705bc99dfd.diff
LOG: [clang] NFC: introduce test for D126620
Signed-off-by: Matheus Izvekov <mizvekov at gmail.com>
Reviewed By: v.g.vassilev
Differential Revision: https://reviews.llvm.org/D126674
Added:
Modified:
clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp
Removed:
################################################################################
diff --git a/clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp b/clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp
index 38dde7367fea..7eddef1cb71f 100644
--- a/clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp
+++ b/clang/test/CXX/temp/temp.decls/temp.class.spec/p6.cpp
@@ -74,3 +74,16 @@ namespace rdar8651930 {
int array0[Outer<int>::Inner<int, int>::value? 1 : -1];
int array1[Outer<int>::Inner<int, float>::value? -1 : 1];
}
+
+namespace print_dependent_TemplateSpecializationType {
+
+template <class T, class U> struct Foo {
+ template <unsigned long, class X, class Y> struct Bar;
+ template <class Y> struct Bar<0, T, Y> {};
+ // expected-note-re at -1 {{previous declaration {{.*}} 'Bar<0UL, int, type-parameter-0-0>' is here}}
+ template <class Y> struct Bar<0, U, Y> {};
+ // expected-error at -1 {{partial specialization 'Bar<0, int, Y>' cannot be redeclared}}
+};
+template struct Foo<int, int>; // expected-note {{requested here}}
+
+} // namespace print_dependent_TemplateSpecializationType
More information about the cfe-commits
mailing list