forked from OSchip/llvm-project
[clang-tidy] Sort includes case-sensitively.
The motivation is: 1. consistency with clang-format, vim :sort etc. 2. we don't want the tools to depend on the current locale to do the include sorting llvm-svn: 255243
This commit is contained in:
parent
90a36c5ba1
commit
a396143a28
|
@ -188,10 +188,7 @@ std::vector<FixItHint> IncludeSorter::GetEdits() {
|
|||
// delete inclusions.
|
||||
for (int IncludeKind = 0; IncludeKind < IK_InvalidInclude; ++IncludeKind) {
|
||||
std::sort(IncludeBucket[IncludeKind].begin(),
|
||||
IncludeBucket[IncludeKind].end(),
|
||||
[](const std::string &Left, const std::string &Right) {
|
||||
return llvm::StringRef(Left).compare_lower(Right) < 0;
|
||||
});
|
||||
IncludeBucket[IncludeKind].end());
|
||||
for (const auto &IncludeEntry : IncludeBucket[IncludeKind]) {
|
||||
auto &Location = IncludeLocations[IncludeEntry];
|
||||
SourceRangeVector::iterator LocationIterator = Location.begin();
|
||||
|
|
Loading…
Reference in New Issue