aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-02-06 16:54:35 +0000
committerNico Weber <nicolasweber@gmx.de>2013-02-06 16:54:35 +0000
commit4ed7f3e003c906d9fdb92a9484feeb8ac6e28e2f (patch)
treeb3d8419b6c98f402a12b0ceee2a382acdb7fd741 /unittests/Format/FormatTest.cpp
parentb3507cd01ead99113eed92a815b826f26f6dbadb (diff)
Formatter: Correctly detect ObjC message expressions preceded by a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index d2a1bef35b..7e88c4e34a 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -2422,6 +2422,12 @@ TEST_F(FormatTest, FormatObjCMethodExpr) {
" fraction:1.0\n"
" respectFlipped:NO\n"
" hints:nil];");
+
+ verifyFormat(
+ "scoped_nsobject<NSTextField> message(\n"
+ " // The frame will be fixed up when |-setMessageText:| is called.\n"
+ " [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 0, 0)]);");
+
}
TEST_F(FormatTest, ObjCAt) {