[C++11] Simplify compare operators with std::tie.
No functionality change.
llvm-svn: 202755
diff --git a/clang/lib/AST/VTableBuilder.cpp b/clang/lib/AST/VTableBuilder.cpp
index 741be14..ce27fba 100644
--- a/clang/lib/AST/VTableBuilder.cpp
+++ b/clang/lib/AST/VTableBuilder.cpp
@@ -2156,10 +2156,7 @@
std::sort(ThunksVector.begin(), ThunksVector.end(),
[](const ThunkInfo &LHS, const ThunkInfo &RHS) {
assert(LHS.Method == 0 && RHS.Method == 0);
-
- if (LHS.This != RHS.This)
- return LHS.This < RHS.This;
- return LHS.Return < RHS.Return;
+ return std::tie(LHS.This, LHS.Return) < std::tie(RHS.This, RHS.Return);
});
Out << "Thunks for '" << MethodName << "' (" << ThunksVector.size();
@@ -3169,9 +3166,7 @@
[](const ThunkInfo &LHS, const ThunkInfo &RHS) {
// Keep different thunks with the same adjustments in the order they
// were put into the vector.
- if (LHS.This != RHS.This)
- return LHS.This < RHS.This;
- return LHS.Return < RHS.Return;
+ return std::tie(LHS.This, LHS.Return) < std::tie(RHS.This, RHS.Return);
});
Out << "Thunks for '" << MethodName << "' (" << ThunksVector.size();