http://llvm.org/bugs/show_bug.cgi?id=14745

             Bug #: 14745
           Summary: Formatting empty function bodies
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


Created attachment 9772
  --> http://llvm.org/bugs/attachment.cgi?id=9772
Test file to reporduce the bug

// In LLVM it is common to use '{}' to write an empty function body.
A::A : numberA(10), numberB(10), numberC(10), numberD(10), numberE(10),
    numberF(10) {}

clang-format turns this currently into

A::A : numberA(10), numberB(10), numberC(10), numberD(10), numberE(10),
    numberF(10) {
}

I did a simple grep:

$ grep -R '{}' * llvm/lib/ | wc
    830    4400   73778

Most of these patches are due to the above pattern. With more than 800 matches
the pattern is very common and seems worth supporting in clang-format.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to