https://bugs.llvm.org/show_bug.cgi?id=47634
Bug ID: 47634
Summary: [clang-format] Sorting duplicated includes produces
invalid code
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangb...@nondot.org
Reporter: curde...@gmail.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org
When trying to test bug #46555, I've tested this code:
```
#include <array>
#include <array>
#include <vector>
#include <vector>
```
with .clang-format being just:
```
SortIncludes: true
```
Clang-format produces invalid code:
```
#include <array>
#include <#include <vector>
```
It happens only though when invoked from VSCode extension (which probably
passes offsets). I'll update the report when I get the full command line.
All versions from at least 7.1.0 until at least post-11.0.0 trunk from
2020-09-22 (clang-format version 12.0.0 (g...@github.com:llvm/llvm-project.git
7bc3c860a75fc69e0eea0d3ea8233b363304de9a)) are affected.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs