https://bugs.llvm.org/show_bug.cgi?id=36919

            Bug ID: 36919
           Summary: [Formatter/ObjC] ObjC dict literals do not obey
                    SpacesInContainerLiterals
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

Running clang-format from r327805, Objective-C dictionary literals should
follow the same spacing rules as array literals, but they only apply spaces
around the colons, not after { and before }:

% echo '@[@"a", @"b", @"c"]' | clang-format -style '{SpacesInContainerLiterals:
true}'
@[ @"a", @"b", @"c" ]

% echo '@[@"a", @"b", @"c"]' | clang-format -style '{SpacesInContainerLiterals:
false}'
@[@"a", @"b", @"c"]

% echo '@{@"a": @"b", @"c": @"d"}' | clang-format -style
'{SpacesInContainerLiterals: true}'
@{@"a" : @"b", @"c" : @"d"}

% echo '@{@"a": @"b", @"c": @"d"}' | clang-format -style
'{SpacesInContainerLiterals: false}'
@{@"a": @"b", @"c": @"d"}

I would expect the third to be:

@{ @"a" : @"b", @"c" : @"d" }

or maybe:

@{ @"a": @"b", @"c": @"d" }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to