[PATCH] D86470: [SyntaxTree] Use annotations on ClassTemplate_MemberClassDefinition test
Eduardo Caldas via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 24 09:39:37 PDT 2020
eduucaldas created this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
eduucaldas requested review of this revision.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86470
Files:
clang/unittests/Tooling/Syntax/BuildTreeTest.cpp
Index: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp
===================================================================
--- clang/unittests/Tooling/Syntax/BuildTreeTest.cpp
+++ clang/unittests/Tooling/Syntax/BuildTreeTest.cpp
@@ -3007,55 +3007,37 @@
)txt"));
}
-TEST_P(SyntaxTreeTest, Templates2) {
+TEST_P(SyntaxTreeTest, ClassTemplate_MemberClassDefinition) {
if (!GetParam().isCXX()) {
return;
}
- EXPECT_TRUE(treeDumpEqual(
+ EXPECT_TRUE(treeDumpEqualOnAnnotations(
R"cpp(
template <class T> struct X { struct Y; };
-template <class T> struct X<T>::Y {};
+[[template <class T> struct X<T>::Y {};]]
)cpp",
- R"txt(
-*: TranslationUnit
-|-TemplateDeclaration
-| |-template
-| |-<
-| |-UnknownDeclaration
-| | |-class
-| | `-T
-| |->
-| `-SimpleDeclaration
-| |-struct
-| |-X
-| |-{
-| |-SimpleDeclaration
-| | |-struct
-| | |-Y
-| | `-;
-| |-}
-| `-;
-`-TemplateDeclaration
- |-template
- |-<
- |-UnknownDeclaration
- | |-class
- | `-T
- |->
- `-SimpleDeclaration
- |-struct
- |-NestedNameSpecifier
- | |-SimpleTemplateNameSpecifier
- | | |-X
- | | |-<
- | | |-T
- | | `->
- | `-::
- |-Y
- |-{
- |-}
- `-;
-)txt"));
+ {R"txt(
+TemplateDeclaration
+|-template
+|-<
+|-UnknownDeclaration
+| |-class
+| `-T
+|->
+`-SimpleDeclaration
+ |-struct
+ |-NestedNameSpecifier
+ | |-SimpleTemplateNameSpecifier
+ | | |-X
+ | | |-<
+ | | |-T
+ | | `->
+ | `-::
+ |-Y
+ |-{
+ |-}
+ `-;
+)txt"}));
}
TEST_P(SyntaxTreeTest, ExplicitClassTemplateInstantation_Definition) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86470.287423.patch
Type: text/x-patch
Size: 1575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200824/4cff263b/attachment.bin>
More information about the cfe-commits
mailing list