<div dir="ltr">The current version of clang-format does not apply formatting rules inside of c blocks. This significantly reduces the usefulness of clang-format in Obj-C projects.<br><div class="gmail_quote"><div dir="ltr"><div><br></div><div>When I turned on debug, I noticed that all the lines were being added as child-lines in the UnwrappedLineParser, which apparently causes Format to not suggest replacements.<br></div><div><br></div><div>parseStructuralElement had some code to parse C Blocks and handed them off to parseChildBlock. I changed that to use parseLevel  so that the blocks would be handled like other types of blocks. I found 3 different places that blocks can be encountered, a variable declaration(parseStructuralElement), an objective-c invocation(parseSquare), and a C method invocation(parseParens). This patch should pass the tokens through a new method parseCBlock when a carat is encountered in those methods.</div><div><br></div><div>All of the tests continue to pass. I did not see any clang-format tests that tested any multi-line behavior and it wasn't too clear how to add them. I did run this on a lot of different styles of block behavior, and it works as expected.</div><div><br></div><div>Thanks for the awesome project, if there's anything I can do to help this get accepted, I'll gladly keep working on it.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>Brian King</div><div><br></div></font></span></div>
</div><br></div>