[SyntaxTree] Test for '\' inside token.

Differential Revision: https://reviews.llvm.org/D87895
This commit is contained in:
Eduardo Caldas 2020-09-18 09:34:57 +00:00
parent f8f1e5fb39
commit e616a42598
1 changed files with 17 additions and 0 deletions

View File

@ -167,6 +167,23 @@ TranslationUnit Detached
)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(