clang-format: Properly align ObjC string literals.
Before:
NSString s = @"a"
"b"
"c";
NSString s = @"a"
@"b"
@"c";
After:
NSString s = @"a"
"b"
"c";
NSString s = @"a"
@"b"
@"c";
This fixes llvm.org/PR23536.
llvm-svn: 237538
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index f3a875b..f7510c8 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4768,7 +4768,11 @@
verifyFormat("f(@\"a\"\n"
" @\"b\");");
verifyFormat("NSString s = @\"a\"\n"
- " @\"b\";");
+ " @\"b\"\n"
+ " @\"c\";");
+ verifyFormat("NSString s = @\"a\"\n"
+ " \"b\"\n"
+ " \"c\";");
}
TEST_F(FormatTest, AlwaysBreakAfterDefinitionReturnType) {