diff options
author | Daniel Jasper <djasper@google.com> | 2013-11-09 03:08:25 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-11-09 03:08:25 +0000 |
commit | 279430585a45ba40b01519ca8ac41987b2b42660 (patch) | |
tree | 6552bf35761d879d70d8ef4edb53df72e4115310 /clang/unittests/Format/FormatTest.cpp | |
parent | d1c58ed8a7d51ee476b0b1638fa3a8bb8b0b445a (diff) | |
download | bcm5719-llvm-279430585a45ba40b01519ca8ac41987b2b42660.tar.gz bcm5719-llvm-279430585a45ba40b01519ca8ac41987b2b42660.zip |
clang-format: Fix alignment of ObjC string literals.
This used to interfere with AlwaysBreakBeforeMultilineStrings.
This fixes llvm.org/PR17856.
llvm-svn: 194310
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index e37f0cd4eb9..d02fb3405c7 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -3636,6 +3636,13 @@ TEST_F(FormatTest, AlwaysBreakBeforeMultilineStrings) { "b\\\n" "c\";", Break)); + + // Exempt ObjC strings for now. + EXPECT_EQ("NSString *const kString = @\"aaaa\"\n" + " \"bbbb\";", + format("NSString *const kString = @\"aaaa\"\n" + "\"bbbb\";", + Break)); } TEST_F(FormatTest, AlignsPipes) { |