Previously, clang-format would sometimes insert a space
before the closing brace in an Objective-C dictionary literal.
Unlike array literals (which obey Style.SpacesInContainerLiterals
to add a space after [ and before ]), Objective-C dictionary
literals currently are not meant to insert a space after { and before
}, regardless of Style.SpacesInContainerLiterals.
However, some constructs like @{foo : @(bar)} caused clang-format
to insert a space between ) and }.
This fixes the issue and adds tests. (I understand the behavior is
not consistent between array literals and dictionary literals, but
that's existing behavior that's a much larger change.)
Test Plan: New tests added. Ran tests with:
% make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests
Could you use Right.MatchingParen->endsSequence(TT_DictLiteral, tok::at) here?