[LLVMbugs] [Bug 14698] New: Formatting should optionally inline member functions on one line if possible

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Dec 22 16:45:22 PST 2012


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

             Bug #: 14698
           Summary: Formatting should optionally inline member functions
                    on one line if possible
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Short one-line inline member functions are very common in the clang codebase,
for example

  NamedDecl *getDecl() const { return *ir; }

  NamedDecl *operator*() const { return getDecl(); }

  UnresolvedSetIterator &operator++() { ++ir; return *this; }
  UnresolvedSetIterator operator++(int) { return UnresolvedSetIterator(ir++); }
  UnresolvedSetIterator &operator--() { --ir; return *this; }
  UnresolvedSetIterator operator--(int) { return UnresolvedSetIterator(ir--); }

from UnresolvedSet.h. libFormat should have an option to keep these methods
that way, and the option should be true for LLVM style.

-- 
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.



More information about the llvm-bugs mailing list