[llvm-bugs] [Bug 32626] New: clang-format: Have option to put main header in its own block when it's bubbled to the top

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 11 09:46:20 PDT 2017


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

            Bug ID: 32626
           Summary: clang-format: Have option to put main header in its
                    own block when it's bubbled to the top
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

clang-format tries to find the main .h file belonging to a cc file and bubbles
it to the top when sorting includes. It'd be cool if there was an option to
have it insert a blank line below the main header, so that

#include "bar.h"
#include "baz.h"
#include "foo.h"

becomes

#include "foo.h"

#include "bar.h"
#include "baz.h"


if it's in foo.cc. Is that something you'd accept a patch for? Requested in
https://bugs.chromium.org/p/chromium/issues/detail?id=710164 and we always put
that blank line there in Chromium.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170411/bdaf4d83/attachment.html>


More information about the llvm-bugs mailing list