]> granicus.if.org Git - clang/commit
[clang-format/ObjC] Do not insert space after opening brace of ObjC dict literal
authorBen Hamilton <benhamilton@google.com>
Tue, 3 Apr 2018 14:07:09 +0000 (14:07 +0000)
committerBen Hamilton <benhamilton@google.com>
Tue, 3 Apr 2018 14:07:09 +0000 (14:07 +0000)
commit26174e90fd1266c0aaddec2332a8b8d735b565b9
tree8950b0f471d0b2c86fbea9642162b1d9358cd064
parent50eab4d40b78930e9fc5fce05486c18d65376f9d
[clang-format/ObjC] Do not insert space after opening brace of ObjC dict literal

Summary:
D44816 attempted to fix a few cases where `clang-format` incorrectly
inserted a space before the closing brace of an Objective-C dictionary
literal.

This revealed there were still a few cases where we inserted a space
after the opening brace of an Objective-C dictionary literal.

This fixes the formatting to be consistent and adds more tests.

Test Plan: New tests added. Confirmed tests failed before
  diff and passed after diff.
  Ran tests with:
  % make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests

Reviewers: djasper, jolesiak, krasimir

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D45168

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329069 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Format/TokenAnnotator.cpp
unittests/Format/FormatTestObjC.cpp