diff options
author | mydeveloperday <mydeveloperday@gmail.com> | 2020-12-23 14:44:31 +0000 |
---|---|---|
committer | mydeveloperday <mydeveloperday@gmail.com> | 2020-12-23 14:45:14 +0000 |
commit | 031743cb5b3c6c2df85a67d8533ef72a95e76cdc (patch) | |
tree | 33fd2372e713bd88512b24b75265df6134d6f656 /clang/unittests/Format/FormatTestComments.cpp | |
parent | 5426b2f9ed9f6f3a3e1d6452325f7a49a5d08ec4 (diff) | |
download | llvm-031743cb5b3c6c2df85a67d8533ef72a95e76cdc.zip llvm-031743cb5b3c6c2df85a67d8533ef72a95e76cdc.tar.gz llvm-031743cb5b3c6c2df85a67d8533ef72a95e76cdc.tar.bz2 |
[clang-format] PR48539 ReflowComments breaks Qt translation comments
https://bugs.llvm.org/show_bug.cgi?id=48539
Add support for Qt Translator Comments to reflow
When reflown and a part of the comments are added on a new line, it should repeat these extra characters as part of the comment token.
Reviewed By: curdeius, HazardyKnusperkeks
Differential Revision: https://reviews.llvm.org/D93490
Diffstat (limited to 'clang/unittests/Format/FormatTestComments.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestComments.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestComments.cpp b/clang/unittests/Format/FormatTestComments.cpp index 27dfe71..457e732 100644 --- a/clang/unittests/Format/FormatTestComments.cpp +++ b/clang/unittests/Format/FormatTestComments.cpp @@ -702,6 +702,12 @@ TEST_F(FormatTestComments, SplitsLongCxxComments) { " // long 1 2 3 4 5 6\n" "}", getLLVMStyleWithColumns(20))); + + EXPECT_EQ("//: A comment that\n" + "//: doesn't fit on\n" + "//: one line", + format("//: A comment that doesn't fit on one line", + getLLVMStyleWithColumns(20))); } TEST_F(FormatTestComments, PreservesHangingIndentInCxxComments) { |