https://bugs.llvm.org/show_bug.cgi?id=37868
Bug ID: 37868
Summary: clang-format 7.0.0 does not account for lines inserted
due to include regrouping when computing new cursor
position
Product: new-bugs
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedb...@nondot.org
Reporter: develo...@martinwinter.com
CC: llvm-bugs@lists.llvm.org
In clang-format 7.0.0, when the option “IncludeBlocks: Regroup” is active with
at least two “IncludeCategories”, the new cursor position after formatting does
not account for any inserted lines between include groups. I can reliable
reproduce this: For example, when an existing number of includes (not separated
by empty lines) is grouped into three new groups, the inserted two lines are
not accounted for, causing a cursor located below the includes to jump towards
the beginning of the document by two characters. In other words, the numeric
cursor position remains the same (e. g. 913) when it should have been increased
(e. g. by 2 to 915). Positioning works fine above or within the includes
themselves.
--
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