From 0928553eecaa835b9983c8afbc8ee3948327a06c Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Sun, 17 May 2015 08:13:23 +0000 Subject: 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 --- clang/unittests/Format/FormatTest.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'clang/unittests/Format/FormatTest.cpp') 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) { -- cgit v1.2.3