aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/TokenAnnotatorTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/TokenAnnotatorTest.cpp')
-rw-r--r--clang/unittests/Format/TokenAnnotatorTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/TokenAnnotatorTest.cpp b/clang/unittests/Format/TokenAnnotatorTest.cpp
index a1285e4..e281a49 100644
--- a/clang/unittests/Format/TokenAnnotatorTest.cpp
+++ b/clang/unittests/Format/TokenAnnotatorTest.cpp
@@ -4126,6 +4126,13 @@ TEST_F(TokenAnnotatorTest, JsonCodeInRawString) {
EXPECT_TOKEN(Tokens[6], tok::colon, TT_DictLiteral);
}
+TEST_F(TokenAnnotatorTest, LineCommentTrailingBackslash) {
+ auto Tokens = annotate("// a \\\n"
+ "// b");
+ ASSERT_EQ(Tokens.size(), 3u) << Tokens;
+ EXPECT_TOKEN(Tokens[1], tok::comment, TT_LineComment);
+}
+
} // namespace
} // namespace format
} // namespace clang