This is an archive of the discontinued LLVM Phabricator instance.

clang-format: Allow space after 'if' but not '@synchronized'.
AbandonedPublic

Authored by strager on Jun 25 2015, 11:36 PM.

Details

Reviewers
djasper
thakis
Summary

Add an option to SpaceBeforeParens,
ControlStatementsExceptObjC, which behaves as
ControlStatements in all cases except after '@synchronized'
(where it behaves as Never).

Depends on D10371.

Diff Detail

Event Timeline

strager updated this revision to Diff 28535.Jun 25 2015, 11:36 PM
strager retitled this revision from to clang-format: Allow space after 'if' but not '@synchronized'..
strager updated this object.
strager edited the test plan for this revision. (Show Details)
strager added a reviewer: djasper.
strager added subscribers: sas, abdulras, Unknown Object (MLST).
djasper edited edge metadata.

Makes sense to me. Nico, what do you think?

thakis edited edge metadata.Jun 27 2015, 6:02 PM

As said on http://reviews.llvm.org/D10371#195408 : Does anyone ever want a space after @synchronized? Do we need an option for this? As far as I understand strager, he doesn't want a space there either and the current behavior is to not add a space between ObjC @words.

I don't know as I don't use ObjC and am not familiar with the style guides. However, if no one currently desires the space, I am strongly against introducing the option. Options have costs for a variety of reasons.

strager abandoned this revision.Jun 29 2015, 4:45 PM

I will remove the option (this diff) and change D10371.