diff options
Diffstat (limited to 'include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h')
-rw-r--r-- | include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h b/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h index 9502900f7e35..37be69aaba84 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h @@ -11,6 +11,7 @@ #define LLVM_CLANG_SA_CORE_APSINTTYPE_H #include "llvm/ADT/APSInt.h" +#include <tuple> namespace clang { namespace ento { @@ -97,13 +98,8 @@ public: /// Unsigned integers are considered to be better conversion types than /// signed integers of the same width. bool operator<(const APSIntType &Other) const { - if (BitWidth < Other.BitWidth) - return true; - if (BitWidth > Other.BitWidth) - return false; - if (!IsUnsigned && Other.IsUnsigned) - return true; - return false; + return std::tie(BitWidth, IsUnsigned) < + std::tie(Other.BitWidth, Other.IsUnsigned); } }; |