diff options
| author | Daniel Jasper <djasper@google.com> | 2014-04-27 10:03:19 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2014-04-27 10:03:19 +0000 |
| commit | 66935020c4241bb8cb0478cd6bbaf0a9f90d02f7 (patch) | |
| tree | cb4c96b31d495fe4119a6bd58fee47286fa9a8df /clang/unittests/Format/FormatTest.cpp | |
| parent | 0ea5d091c7223846621214553bd8a0a000275b74 (diff) | |
| download | bcm5719-llvm-66935020c4241bb8cb0478cd6bbaf0a9f90d02f7.tar.gz bcm5719-llvm-66935020c4241bb8cb0478cd6bbaf0a9f90d02f7.zip | |
clang-format: Fix bug when aligning trailing /**/-comments in macros.
Previously this could lead to a column limit violation with the
required escaped newlines.
llvm-svn: 207351
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 398850c38ac..d18968afd5a 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -832,6 +832,17 @@ TEST_F(FormatTest, UnderstandsSingleLineComments) { " // first\n" "// at start\n" "otherLine();")); + + verifyFormat( + "#define A \\\n" + " int i; /* iiiiiiiiiiiiiiiiiiiii */ \\\n" + " int jjjjjjjjjjjjjjjjjjjjjjjj; /* */", + getLLVMStyleWithColumns(60)); + verifyFormat( + "#define A \\\n" + " int i; /* iiiiiiiiiiiiiiiiiiiii */ \\\n" + " int jjjjjjjjjjjjjjjjjjjjjjjj; /* */", + getLLVMStyleWithColumns(61)); } TEST_F(FormatTest, KeepsParameterWithTrailingCommentsOnTheirOwnLine) { |

