11 using namespace clang;
16 bool AllowSignConversions)
const {
19 if (IsUnsigned && !AllowSignConversions &&
20 Value.isSigned() && Value.isNegative())
24 if (AllowSignConversions) {
25 if (Value.isSigned() && !IsUnsigned)
26 MinBits = Value.getMinSignedBits();
28 MinBits = Value.getActiveBits();
36 MinBits = Value.getMinSignedBits() - IsUnsigned;
38 MinBits = Value.getActiveBits() + !IsUnsigned;
41 if (MinBits <= BitWidth)
44 if (Value.isSigned() && Value.isNegative())
Value is less than the minimum representable value.
Value is representable using this type.
RangeTestResultKind testInRange(const llvm::APSInt &Val, bool AllowMixedSign) const LLVM_READONLY
Tests whether a given value is losslessly representable using this type.
Value is greater than the maximum representable value.
RangeTestResultKind
Used to classify whether a value is representable using this type.
Dataflow Directional Tag Classes.