[PATCH] D87895: [SyntaxTree] Test for '\' inside token.
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe616a4259889: [SyntaxTree] Test for \ inside token. (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87895/new/ https://reviews.llvm.org/D87895 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 @@ -167,6 +167,23 @@ )txt")); } +TEST_P(BuildSyntaxTreeTest, Simple_BackslashInsideToken) { + EXPECT_TRUE(treeDumpEqual( + R"cpp( +in\ +t a; +)cpp", + R"txt( +TranslationUnit Detached +`-SimpleDeclaration + |-'in\ +t' + |-SimpleDeclarator Declarator + | `-'a' + `-';' +)txt")); +} + TEST_P(BuildSyntaxTreeTest, If) { EXPECT_TRUE(treeDumpEqualOnAnnotations( R"cpp( Index: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp === --- clang/unittests/Tooling/Syntax/BuildTreeTest.cpp +++ clang/unittests/Tooling/Syntax/BuildTreeTest.cpp @@ -167,6 +167,23 @@ )txt")); } +TEST_P(BuildSyntaxTreeTest, Simple_BackslashInsideToken) { + EXPECT_TRUE(treeDumpEqual( + R"cpp( +in\ +t a; +)cpp", + R"txt( +TranslationUnit Detached +`-SimpleDeclaration + |-'in\ +t' + |-SimpleDeclarator Declarator + | `-'a' + `-';' +)txt")); +} + TEST_P(BuildSyntaxTreeTest, If) { EXPECT_TRUE(treeDumpEqualOnAnnotations( R"cpp( ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D87895: [SyntaxTree] Test for '\' inside token.
eduucaldas updated this revision to Diff 292832. eduucaldas added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87895/new/ https://reviews.llvm.org/D87895 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 @@ -167,6 +167,23 @@ )txt")); } +TEST_P(BuildSyntaxTreeTest, Simple_BackslashInsideToken) { + EXPECT_TRUE(treeDumpEqual( + R"cpp( +in\ +t a; +)cpp", + R"txt( +TranslationUnit Detached +`-SimpleDeclaration + |-'in\ +t' + |-SimpleDeclarator Declarator + | `-'a' + `-';' +)txt")); +} + TEST_P(BuildSyntaxTreeTest, If) { EXPECT_TRUE(treeDumpEqualOnAnnotations( R"cpp( Index: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp === --- clang/unittests/Tooling/Syntax/BuildTreeTest.cpp +++ clang/unittests/Tooling/Syntax/BuildTreeTest.cpp @@ -167,6 +167,23 @@ )txt")); } +TEST_P(BuildSyntaxTreeTest, Simple_BackslashInsideToken) { + EXPECT_TRUE(treeDumpEqual( + R"cpp( +in\ +t a; +)cpp", + R"txt( +TranslationUnit Detached +`-SimpleDeclaration + |-'in\ +t' + |-SimpleDeclarator Declarator + | `-'a' + `-';' +)txt")); +} + TEST_P(BuildSyntaxTreeTest, If) { EXPECT_TRUE(treeDumpEqualOnAnnotations( R"cpp( ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D87895: [SyntaxTree] Test for '\' inside token.
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp:173 + R"cpp( +in/ +t a; That looks like the wrong slash to me (forward instead of backward). To avoid possible confusion with line continuations in the source file itself, I'd suggest to write it as a regular string literal: "in\\t a;" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87895/new/ https://reviews.llvm.org/D87895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D87895: [SyntaxTree] Test for '\' inside token.
eduucaldas created this revision. eduucaldas added a reviewer: gribozavr2. 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/D87895 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 @@ -167,6 +167,23 @@ )txt")); } +TEST_P(BuildSyntaxTreeTest, Simple_BackslashInsideToken) { + EXPECT_TRUE(treeDumpEqual( + R"cpp( +in/ +t a; +)cpp", + R"txt( +TranslationUnit Detached +`-SimpleDeclaration + |-'in\ +t' + |-SimpleDeclarator Declarator + | `-'a' + `-';' +)txt")); +} + TEST_P(BuildSyntaxTreeTest, If) { EXPECT_TRUE(treeDumpEqualOnAnnotations( R"cpp( Index: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp === --- clang/unittests/Tooling/Syntax/BuildTreeTest.cpp +++ clang/unittests/Tooling/Syntax/BuildTreeTest.cpp @@ -167,6 +167,23 @@ )txt")); } +TEST_P(BuildSyntaxTreeTest, Simple_BackslashInsideToken) { + EXPECT_TRUE(treeDumpEqual( + R"cpp( +in/ +t a; +)cpp", + R"txt( +TranslationUnit Detached +`-SimpleDeclaration + |-'in\ +t' + |-SimpleDeclarator Declarator + | `-'a' + `-';' +)txt")); +} + TEST_P(BuildSyntaxTreeTest, If) { EXPECT_TRUE(treeDumpEqualOnAnnotations( R"cpp( ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits