Author: Eduardo Caldas Date: 2020-08-25T06:07:40Z New Revision: 7f426c65b06f2d19546b2d50fccc15de9dde3d85
URL: https://github.com/llvm/llvm-project/commit/7f426c65b06f2d19546b2d50fccc15de9dde3d85 DIFF: https://github.com/llvm/llvm-project/commit/7f426c65b06f2d19546b2d50fccc15de9dde3d85.diff LOG: [SyntaxTree] Use annotations on ClassTemplate_MemberClassDefinition test Differential Revision: https://reviews.llvm.org/D86470 Added: Modified: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp Removed: ################################################################################ diff --git a/clang/unittests/Tooling/Syntax/BuildTreeTest.cpp b/clang/unittests/Tooling/Syntax/BuildTreeTest.cpp index 2ad01f09596e..0d24432115cc 100644 --- a/clang/unittests/Tooling/Syntax/BuildTreeTest.cpp +++ b/clang/unittests/Tooling/Syntax/BuildTreeTest.cpp @@ -3007,55 +3007,37 @@ namespace n { )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