diff options
author | Andi-Bogdan Postelnicu <andi@mozilla.com> | 2016-10-26 07:44:51 +0000 |
---|---|---|
committer | Andi-Bogdan Postelnicu <andi@mozilla.com> | 2016-10-26 07:44:51 +0000 |
commit | a9a8fdee7e19c90a0529a5ad75cb49d6f1d4635f (patch) | |
tree | e23badf5a5684b4aa7522b8d5e2529a7a79e0530 /clang/unittests/Format | |
parent | 6aafa89c34437a772ef3d4c6ca7df7d03543ab7c (diff) | |
download | bcm5719-llvm-a9a8fdee7e19c90a0529a5ad75cb49d6f1d4635f.tar.gz bcm5719-llvm-a9a8fdee7e19c90a0529a5ad75cb49d6f1d4635f.zip |
Bug 28065 - clang-format incorrectly aligns backslash.
llvm-svn: 285178
Diffstat (limited to 'clang/unittests/Format')
-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 f04f5e5dc0d..ee08121c5ad 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -11597,6 +11597,17 @@ TEST_F(ReplacementTest, SortIncludesAfterReplacement) { EXPECT_EQ(Expected, *Result); } +TEST_F(FormatTest, AllignTrailingComments) { + EXPECT_EQ("#define MACRO(V) \\\n" + " V(Rt2) /* one more char */ \\\n" + " V(Rs) /* than here */ \\\n" + "/* comment 3 */\n", + format("#define MACRO(V)\\\n" + "V(Rt2) /* one more char */ \\\n" + "V(Rs) /* than here */ \\\n" + "/* comment 3 */ \\\n", + getLLVMStyleWithColumns(40))); +} } // end namespace } // end namespace format } // end namespace clang |