diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp b/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp index 2060a4d0613..24647f8e22c 100644 --- a/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp +++ b/clang-tools-extra/clang-tidy/llvm/IncludeOrderCheck.cpp @@ -107,7 +107,8 @@ void IncludeOrderPPCallbacks::EndOfMainFile() { // Sort the includes. We first sort by priority, then lexicographically. for (unsigned BI = 0, BE = Blocks.size() - 1; BI != BE; ++BI) - std::sort(&IncludeIndices[Blocks[BI]], &IncludeIndices[Blocks[BI + 1]], + std::sort(IncludeIndices.begin() + Blocks[BI], + IncludeIndices.begin() + Blocks[BI + 1], [this](unsigned LHSI, unsigned RHSI) { IncludeDirective &LHS = IncludeDirectives[LHSI]; IncludeDirective &RHS = IncludeDirectives[RHSI]; |