9 #ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_APSINTTYPE_H 10 #define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_APSINTTYPE_H 12 #include "llvm/ADT/APSInt.h" 25 : BitWidth(Width), IsUnsigned(Unsigned) {}
40 Value = Value.extOrTrunc(BitWidth);
41 Value.setIsUnsigned(IsUnsigned);
61 return llvm::APSInt::getMinValue(BitWidth, IsUnsigned);
66 return llvm::APSInt::getMaxValue(BitWidth, IsUnsigned);
89 bool AllowMixedSign)
const LLVM_READONLY;
92 return BitWidth == Other.BitWidth && IsUnsigned == Other.IsUnsigned;
100 return std::tie(BitWidth, IsUnsigned) <
101 std::tie(Other.BitWidth, Other.IsUnsigned);
bool operator==(const APSIntType &Other) const
Value is less than the minimum representable value.
APSIntType(const llvm::APSInt &Value)
Value is representable using this type.
A record of the "type" of an APSInt, used for conversions.
APSIntType(uint32_t Width, bool Unsigned)
RangeTestResultKind testInRange(const llvm::APSInt &Val, bool AllowMixedSign) const LLVM_READONLY
Tests whether a given value is losslessly representable using this type.
llvm::APSInt getZeroValue() const LLVM_READONLY
Returns an all-zero value for this type.
llvm::APSInt getMinValue() const LLVM_READONLY
Returns the minimum value for this type.
uint32_t getBitWidth() const
llvm::APSInt getMaxValue() const LLVM_READONLY
Returns the maximum value for this type.
bool operator<(const APSIntType &Other) const
Provide an ordering for finding a common conversion type.
Value is greater than the maximum representable value.
RangeTestResultKind
Used to classify whether a value is representable using this type.
llvm::APSInt getValue(uint64_t RawValue) const LLVM_READONLY
llvm::APSInt convert(const llvm::APSInt &Value) const LLVM_READONLY
Convert and return a new APSInt with the given value, but this type's bit width and signedness...
Dataflow Directional Tag Classes.
void apply(llvm::APSInt &Value) const
Convert a given APSInt, in place, to match this type.