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: unassignedclangb...@nondot.org
          Reporter: nicolaswe...@gmx.de
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to