reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

include/llvm/ADT/APSInt.h
  177     return compareValues(*this, get(RHS)) == 0;
  180     return compareValues(*this, get(RHS)) != 0;
  183     return compareValues(*this, get(RHS)) <= 0;
  186     return compareValues(*this, get(RHS)) >= 0;
  189     return compareValues(*this, get(RHS)) < 0;
  192     return compareValues(*this, get(RHS)) > 0;
  302     return !compareValues(I1, I2);
  312       return compareValues(I1, I2.extend(I1.getBitWidth()));
  314       return compareValues(I1.extend(I2.getBitWidth()), I2);
tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
11052   return llvm::APSInt::compareValues(LHSVal, RHSVal) >= 0;
tools/clang/lib/Sema/SemaChecking.cpp
10578     switch (llvm::APSInt::compareValues(Value, PromotedMin)) {
10582       switch (llvm::APSInt::compareValues(Value, PromotedMax)) {
tools/clang/lib/Sema/SemaOpenMP.cpp
 7887     if (llvm::APSInt::compareValues(Hint, Pair.second) != 0) {
tools/clang/tools/extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp
   44           return llvm::APSInt::compareValues(E1->getInitVal(),
   60   return llvm::APSInt::compareValues(Range1.MaxVal, Range2.MinVal) < 0 ||
   61          llvm::APSInt::compareValues(Range2.MaxVal, Range1.MinVal) < 0;
tools/clang/tools/extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp
  104     return llvm::APSInt::compareValues(Lower, From.Lower) <= 0 &&
  105            llvm::APSInt::compareValues(Upper, From.Upper) >= 0;
  109     return llvm::APSInt::compareValues(Lower, Value) <= 0 &&
  110            llvm::APSInt::compareValues(Upper, Value) >= 0;
tools/clang/tools/extra/clang-tidy/misc/RedundantExpressionCheck.cpp
  143   assert(APSInt::compareValues(ValueLHS, ValueRHS) <= 0 &&
  146   if (APSInt::compareValues(ValueLHS, ValueRHS) == 0)
  154          APSInt::compareValues(ValueLHS_plus1, ValueRHS) == 0;
  163   assert(APSInt::compareValues(ValueLHS, ValueRHS) <= 0 &&
  167   if (APSInt::compareValues(ValueLHS, ValueRHS) == 0) {
  195       APSInt::compareValues(ValueLHS_plus1, ValueRHS) == 0)
  207   assert(APSInt::compareValues(ValueLHS, ValueRHS) <= 0 &&
  211   if (APSInt::compareValues(ValueLHS, ValueRHS) == 0) {
  234       APSInt::compareValues(ValueLHS_plus1, ValueRHS) == 0)
  254   int Comparison = APSInt::compareValues(ValueLHS, ValueRHS);
  810       if ((Opcode == BO_EQ && APSInt::compareValues(LhsValue, RhsValue) == 0) ||
  811           (Opcode == BO_NE && APSInt::compareValues(LhsValue, RhsValue) != 0)) {
  815                   APSInt::compareValues(LhsValue, RhsValue) != 0) ||
  817                   APSInt::compareValues(LhsValue, RhsValue) == 0)) {
  935     if (APSInt::compareValues(LhsValue, RhsValue) > 0) {
unittests/ADT/APSIntTest.cpp
   85   EXPECT_TRUE(APSInt::compareValues(S(7), S(8)) < 0);
   86   EXPECT_TRUE(APSInt::compareValues(S(8), S(7)) > 0);
   87   EXPECT_TRUE(APSInt::compareValues(S(7), S(7)) == 0);
   88   EXPECT_TRUE(APSInt::compareValues(S(-7), S(8)) < 0);
   89   EXPECT_TRUE(APSInt::compareValues(S(8), S(-7)) > 0);
   90   EXPECT_TRUE(APSInt::compareValues(S(-7), S(-7)) == 0);
   91   EXPECT_TRUE(APSInt::compareValues(S(-7), S(-8)) > 0);
   92   EXPECT_TRUE(APSInt::compareValues(S(-8), S(-7)) < 0);
   93   EXPECT_TRUE(APSInt::compareValues(S(-7), S(-7)) == 0);
   96   EXPECT_TRUE(APSInt::compareValues(U(7), U(8)) < 0);
   97   EXPECT_TRUE(APSInt::compareValues(U(8), U(7)) > 0);
   98   EXPECT_TRUE(APSInt::compareValues(U(7), U(7)) == 0);
  101   EXPECT_TRUE(APSInt::compareValues(U(7), S(8)) < 0);
  102   EXPECT_TRUE(APSInt::compareValues(U(8), S(7)) > 0);
  103   EXPECT_TRUE(APSInt::compareValues(U(7), S(7)) == 0);
  104   EXPECT_TRUE(APSInt::compareValues(U(8), S(-7)) > 0);
  107   EXPECT_TRUE(APSInt::compareValues(S(7).trunc(32), S(8)) < 0);
  108   EXPECT_TRUE(APSInt::compareValues(S(8).trunc(32), S(7)) > 0);
  109   EXPECT_TRUE(APSInt::compareValues(S(7).trunc(32), S(7)) == 0);
  110   EXPECT_TRUE(APSInt::compareValues(S(-7).trunc(32), S(8)) < 0);
  111   EXPECT_TRUE(APSInt::compareValues(S(8).trunc(32), S(-7)) > 0);
  112   EXPECT_TRUE(APSInt::compareValues(S(-7).trunc(32), S(-7)) == 0);
  113   EXPECT_TRUE(APSInt::compareValues(S(-7).trunc(32), S(-8)) > 0);
  114   EXPECT_TRUE(APSInt::compareValues(S(-8).trunc(32), S(-7)) < 0);
  115   EXPECT_TRUE(APSInt::compareValues(S(-7).trunc(32), S(-7)) == 0);
  116   EXPECT_TRUE(APSInt::compareValues(S(7), S(8).trunc(32)) < 0);
  117   EXPECT_TRUE(APSInt::compareValues(S(8), S(7).trunc(32)) > 0);
  118   EXPECT_TRUE(APSInt::compareValues(S(7), S(7).trunc(32)) == 0);
  119   EXPECT_TRUE(APSInt::compareValues(S(-7), S(8).trunc(32)) < 0);
  120   EXPECT_TRUE(APSInt::compareValues(S(8), S(-7).trunc(32)) > 0);
  121   EXPECT_TRUE(APSInt::compareValues(S(-7), S(-7).trunc(32)) == 0);
  122   EXPECT_TRUE(APSInt::compareValues(S(-7), S(-8).trunc(32)) > 0);
  123   EXPECT_TRUE(APSInt::compareValues(S(-8), S(-7).trunc(32)) < 0);
  124   EXPECT_TRUE(APSInt::compareValues(S(-7), S(-7).trunc(32)) == 0);
  127   EXPECT_TRUE(APSInt::compareValues(U(7), U(8).trunc(32)) < 0);
  128   EXPECT_TRUE(APSInt::compareValues(U(8), U(7).trunc(32)) > 0);
  129   EXPECT_TRUE(APSInt::compareValues(U(7), U(7).trunc(32)) == 0);
  130   EXPECT_TRUE(APSInt::compareValues(U(7).trunc(32), U(8)) < 0);
  131   EXPECT_TRUE(APSInt::compareValues(U(8).trunc(32), U(7)) > 0);
  132   EXPECT_TRUE(APSInt::compareValues(U(7).trunc(32), U(7)) == 0);
  135   EXPECT_TRUE(APSInt::compareValues(U(7).trunc(32), S(8)) < 0);
  136   EXPECT_TRUE(APSInt::compareValues(U(8).trunc(32), S(7)) > 0);
  137   EXPECT_TRUE(APSInt::compareValues(U(7).trunc(32), S(7)) == 0);
  138   EXPECT_TRUE(APSInt::compareValues(U(8).trunc(32), S(-7)) > 0);
  139   EXPECT_TRUE(APSInt::compareValues(U(7), S(8).trunc(32)) < 0);
  140   EXPECT_TRUE(APSInt::compareValues(U(8), S(7).trunc(32)) > 0);
  141   EXPECT_TRUE(APSInt::compareValues(U(7), S(7).trunc(32)) == 0);
  142   EXPECT_TRUE(APSInt::compareValues(U(8), S(-7).trunc(32)) > 0);