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

            Bug ID: 47907
           Summary: clang-format misformats struct pointer member refs
                    after objc method calls
           Product: clang
           Version: unspecified
          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]

Created attachment 24078
  --> https://bugs.llvm.org/attachment.cgi?id=24078&action=edit
repro case

When formatting the following code snippet:

  int main() {
    foo([obj method], a->b);
  }

clang-format incorrectly inserts spaces around the arrow:

$ cat test.mm
int main() {
  foo([obj method], a->b);
}

$ clang-format --version
clang-format version 11.0.0 (https://github.com/llvm/llvm-project
eb85e90350e93a64279139e7eca9ca40c8fbf5eb)
$ clang-format test.mm
int main() {
  foo([obj method], a -> b);
}

The test file is attached as well.

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

Reply via email to