12 using namespace clang;
17 bool AllowSignConversions)
const {
20 if (IsUnsigned && !AllowSignConversions &&
21 Value.isSigned() && Value.isNegative())
25 if (AllowSignConversions) {
26 if (Value.isSigned() && !IsUnsigned)
27 MinBits = Value.getMinSignedBits();
29 MinBits = Value.getActiveBits();
37 MinBits = Value.getMinSignedBits() - IsUnsigned;
39 MinBits = Value.getActiveBits() + !IsUnsigned;
42 if (MinBits <= BitWidth)
45 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.