Lines Matching refs:IntRange

6970 struct IntRange {  struct
6977 IntRange(unsigned Width, bool NonNegative) in IntRange() function
6982 static IntRange forBoolType() { in forBoolType() argument
6983 return IntRange(1, true); in forBoolType()
6987 static IntRange forValueOfType(ASTContext &C, QualType T) { in forValueOfType() argument
6993 static IntRange forValueOfCanonicalType(ASTContext &C, const Type *T) { in forValueOfCanonicalType() argument
7007 return IntRange(C.getIntWidth(QualType(T, 0)), false); in forValueOfCanonicalType()
7013 return IntRange(NumPositive, true/*NonNegative*/); in forValueOfCanonicalType()
7015 return IntRange(std::max(NumPositive + 1, NumNegative), in forValueOfCanonicalType()
7022 return IntRange(C.getIntWidth(QualType(T, 0)), BT->isUnsignedInteger()); in forValueOfCanonicalType()
7030 static IntRange forTargetOfCanonicalType(ASTContext &C, const Type *T) { in forTargetOfCanonicalType() argument
7045 return IntRange(C.getIntWidth(QualType(T, 0)), BT->isUnsignedInteger()); in forTargetOfCanonicalType()
7049 static IntRange join(IntRange L, IntRange R) { in join() argument
7050 return IntRange(std::max(L.Width, R.Width), in join()
7055 static IntRange meet(IntRange L, IntRange R) { in meet() argument
7056 return IntRange(std::min(L.Width, R.Width), in meet()
7061 IntRange GetValueRange(ASTContext &C, llvm::APSInt &value, unsigned MaxWidth) { in GetValueRange()
7063 return IntRange(value.getMinSignedBits(), false); in GetValueRange()
7070 return IntRange(value.getActiveBits(), true); in GetValueRange()
7073 IntRange GetValueRange(ASTContext &C, APValue &result, QualType Ty, in GetValueRange()
7079 IntRange R = GetValueRange(C, result.getVectorElt(0), Ty, MaxWidth); in GetValueRange()
7081 IntRange El = GetValueRange(C, result.getVectorElt(i), Ty, MaxWidth); in GetValueRange()
7082 R = IntRange::join(R, El); in GetValueRange()
7088 IntRange R = GetValueRange(C, result.getComplexIntReal(), MaxWidth); in GetValueRange()
7089 IntRange I = GetValueRange(C, result.getComplexIntImag(), MaxWidth); in GetValueRange()
7090 return IntRange::join(R, I); in GetValueRange()
7099 return IntRange(MaxWidth, Ty->isUnsignedIntegerOrEnumerationType()); in GetValueRange()
7113 IntRange GetExprRange(ASTContext &C, const Expr *E, unsigned MaxWidth) { in GetExprRange()
7128 IntRange OutputTypeRange = IntRange::forValueOfType(C, GetExprType(CE)); in GetExprRange()
7137 IntRange SubRange in GetExprRange()
7147 return IntRange(SubRange.Width, in GetExprRange()
7160 IntRange L = GetExprRange(C, CO->getTrueExpr(), MaxWidth); in GetExprRange()
7161 IntRange R = GetExprRange(C, CO->getFalseExpr(), MaxWidth); in GetExprRange()
7162 return IntRange::join(L, R); in GetExprRange()
7177 return IntRange::forBoolType(); in GetExprRange()
7189 return IntRange::forValueOfType(C, GetExprType(E)); in GetExprRange()
7200 return IntRange::forValueOfType(C, GetExprType(E)); in GetExprRange()
7205 return IntRange::meet(GetExprRange(C, BO->getLHS(), MaxWidth), in GetExprRange()
7215 IntRange R = IntRange::forValueOfType(C, GetExprType(E)); in GetExprRange()
7216 return IntRange(R.Width, /*NonNegative*/ true); in GetExprRange()
7222 return IntRange::forValueOfType(C, GetExprType(E)); in GetExprRange()
7227 IntRange L = GetExprRange(C, BO->getLHS(), MaxWidth); in GetExprRange()
7251 return IntRange::forValueOfType(C, GetExprType(E)); in GetExprRange()
7259 IntRange L = GetExprRange(C, BO->getLHS(), opWidth); in GetExprRange()
7273 IntRange R = GetExprRange(C, BO->getRHS(), opWidth); in GetExprRange()
7274 return IntRange(L.Width, L.NonNegative && R.NonNegative); in GetExprRange()
7282 IntRange L = GetExprRange(C, BO->getLHS(), opWidth); in GetExprRange()
7283 IntRange R = GetExprRange(C, BO->getRHS(), opWidth); in GetExprRange()
7285 IntRange meet = IntRange::meet(L, R); in GetExprRange()
7300 IntRange L = GetExprRange(C, BO->getLHS(), MaxWidth); in GetExprRange()
7301 IntRange R = GetExprRange(C, BO->getRHS(), MaxWidth); in GetExprRange()
7302 return IntRange::join(L, R); in GetExprRange()
7309 return IntRange::forBoolType(); in GetExprRange()
7314 return IntRange::forValueOfType(C, GetExprType(E)); in GetExprRange()
7325 return IntRange(BitField->getBitWidthValue(C), in GetExprRange()
7328 return IntRange::forValueOfType(C, GetExprType(E)); in GetExprRange()
7331 IntRange GetExprRange(ASTContext &C, const Expr *E) { in GetExprRange()
7442 IntRange OtherRange = IntRange::forValueOfType(S.Context, OtherT); in DiagnoseOutOfRangeComparison()
7711 IntRange signedRange = GetExprRange(S.Context, signedOperand); in AnalyzeComparison()
7730 IntRange unsignedRange = GetExprRange(S.Context, unsignedOperand); in AnalyzeComparison()
7937 std::string PrettyPrintInRange(const llvm::APSInt &Value, IntRange Range) { in PrettyPrintInRange()
8313 IntRange SourceRange = GetExprRange(S.Context, E); in CheckImplicitConversion()
8314 IntRange TargetRange = IntRange::forTargetOfCanonicalType(S.Context, Target); in CheckImplicitConversion()