| Issue |
182323
|
| Summary |
`clang-format`sorts or groups namespaces in using declarations in a case-insensitive way
|
| Labels |
clang-format
|
| Assignees |
|
| Reporter |
chandlerc
|
`clang-format` seems to treat the namespaces in a series of using declarations in a case insensitive way.
For example, this code:
```cpp
namespace testing {
class A {};
class C {};
class E {};
}
namespace Testing {
class B {};
class D {};
}
using Testing::B;
using Testing::D;
using testing::A;
using testing::C;
using testing::E;
```
Is reformatted to this:
```cpp
namespace testing {
class A {};
class C {};
class E {};
} // namespace testing
namespace Testing {
class B {};
class D {};
} // namespace Testing
using testing::A;
using Testing::B;
using testing::C;
using Testing::D;
using testing::E;
```
Which I think is both surprising and makes reading more difficult.
It's not just a case insensitive sort though -- if you prefix `testing` with `::`, you get the same order from `clang-format`, interleaving `::testing::...` and `Testing::...` entries.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs