From 4c2cc603f5239f3b2963ce3e5d25adcf4d0a028d Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 13 Feb 2013 03:48:27 +0000 Subject: Formatter: Detect ObjC method expressions after casts. Not all casts are correctly detected yet, but it helps in some cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175028 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Format/FormatTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'unittests/Format/FormatTest.cpp') diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index f28bc88444..f2ccdb0022 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -2405,7 +2405,8 @@ TEST_F(FormatTest, FormatObjCMethodExpr) { verifyFormat("int a = &[foo bar:baz];"); verifyFormat("int a = *[foo bar:baz];"); // FIXME: Make casts work, without breaking f()[4]. - //verifyFormat("int a = (int) [foo bar:baz];"); + //verifyFormat("int a = (int)[foo bar:baz];"); + verifyFormat("return (MyType *)[self.tableView cellForRowAtIndexPath:cell];"); // Binary operators. verifyFormat("[foo bar:baz], [foo bar:baz];"); -- cgit v1.2.3-18-g5258