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) {
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) {
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits