We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c0ef83 commit e0f35a5Copy full SHA for e0f35a5
clang-tools-extra/include-fixer/IncludeFixerContext.cpp
@@ -86,9 +86,8 @@ IncludeFixerContext::IncludeFixerContext(
86
// triggered at the same position or unidentified symbol multiple times.
87
std::sort(QuerySymbolInfos.begin(), QuerySymbolInfos.end(),
88
[&](const QuerySymbolInfo &A, const QuerySymbolInfo &B) {
89
- if (A.Range.getOffset() != B.Range.getOffset())
90
- return A.Range.getOffset() < B.Range.getOffset();
91
- return A.Range.getLength() == B.Range.getLength();
+ return std::make_pair(A.Range.getOffset(), A.Range.getLength()) <
+ std::make_pair(B.Range.getOffset(), B.Range.getLength());
92
});
93
QuerySymbolInfos.erase(
94
std::unique(QuerySymbolInfos.begin(), QuerySymbolInfos.end(),
0 commit comments