[PATCH] D87895: [SyntaxTree] Test for '\' inside token.
Eduardo Caldas via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 20 23:56:23 PDT 2020
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(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87895.293082.patch
Type: text/x-patch
Size: 624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200921/cc5254ab/attachment.bin>
More information about the cfe-commits
mailing list