summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-05-17 08:13:23 +0000
committerDaniel Jasper <djasper@google.com>2015-05-17 08:13:23 +0000
commit0928553eecaa835b9983c8afbc8ee3948327a06c (patch)
tree12a21b58be381591c6c6e53f3841547562e3d5f1 /clang/unittests/Format/FormatTest.cpp
parenta8200603d4eeb50a2b771bb0b32edcb4c2c01d04 (diff)
downloadbcm5719-llvm-0928553eecaa835b9983c8afbc8ee3948327a06c.tar.gz
bcm5719-llvm-0928553eecaa835b9983c8afbc8ee3948327a06c.zip
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
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index f3a875b0952..f7510c86189 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4768,7 +4768,11 @@ TEST_F(FormatTest, AlignsStringLiterals) {
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) {
OpenPOWER on IntegriCloud