[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:
Alexander Kornienko 2015-12-10 12:24:19 +00:00
parent 90a36c5ba1
commit a396143a28
1 changed files with 1 additions and 4 deletions

View File

@ -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();