summaryrefslogtreecommitdiffstats
path: root/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-12-28 02:37:25 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-12-28 02:37:25 +0000
commitc6737027b692c3bbe4e6de88b2409491377faeb0 (patch)
treeee92a1878a555611121217679869e1d22a80d0f8 /unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
parent2a7adec11783ba0d3caa20a1f4ec05918450676c (diff)
DR1315: a non-type template argument in a partial specialization is permitted
to make reference to template parameters. This is only a partial implementation; we retain the restriction that the argument must not be type-dependent, since it's unclear how that would work given the existence of other language rules requiring an exact type match in this context, even for type-dependent cases (a question has been raised on the core reflector). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290647 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ASTMatchers/ASTMatchersTraversalTest.cpp')
-rw-r--r--unittests/ASTMatchers/ASTMatchersTraversalTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp b/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
index 789982972e..67a4a3b2fc 100644
--- a/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
+++ b/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
@@ -688,7 +688,7 @@ TEST(TemplateTypeParmDecl, VarTemplatePartialSpecializationDecl) {
"};\n"
"template<typename U>\n"
"template<typename U2>\n"
- "int Struct<U>::field<char> = 123;\n";
+ "int Struct<U>::field<U2*> = 123;\n";
EXPECT_TRUE(matches(input, templateTypeParmDecl(hasName("T"))));
EXPECT_TRUE(matches(input, templateTypeParmDecl(hasName("T2"))));
EXPECT_TRUE(matches(input, templateTypeParmDecl(hasName("U"))));
@@ -703,7 +703,7 @@ TEST(TemplateTypeParmDecl, ClassTemplatePartialSpecializationDecl) {
"};\n"
"template<typename U>\n"
"template<typename U2>\n"
- "struct Class<U>::Struct<int> {};\n";
+ "struct Class<U>::Struct<U2*> {};\n";
EXPECT_TRUE(matches(input, templateTypeParmDecl(hasName("T"))));
EXPECT_TRUE(matches(input, templateTypeParmDecl(hasName("T2"))));
EXPECT_TRUE(matches(input, templateTypeParmDecl(hasName("U"))));