Lines Matching refs:Cast

43   void checkPreStmt(const ImplicitCastExpr *Cast, CheckerContext &C) const;
48 bool isLossOfPrecision(const ImplicitCastExpr *Cast, QualType DestType,
51 bool isLossOfSign(const ImplicitCastExpr *Cast, CheckerContext &C) const;
57 void ConversionChecker::checkPreStmt(const ImplicitCastExpr *Cast, in checkPreStmt() argument
61 if (!isa<DeclRefExpr>(Cast->IgnoreParenImpCasts())) in checkPreStmt()
65 if (Cast->getExprLoc().isMacroID()) in checkPreStmt()
70 const Stmt *Parent = PM.getParent(Cast); in checkPreStmt()
81 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
82 LossOfPrecision = isLossOfPrecision(Cast, Cast->getType(), C); in checkPreStmt()
85 LossOfPrecision = isLossOfPrecision(Cast, B->getLHS()->getType(), C); in checkPreStmt()
87 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
88 LossOfPrecision = isLossOfPrecision(Cast, B->getLHS()->getType(), C); in checkPreStmt()
90 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
93 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
96 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
97 LossOfPrecision = isLossOfPrecision(Cast, B->getLHS()->getType(), C); in checkPreStmt()
99 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
102 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
103 LossOfPrecision = isLossOfPrecision(Cast, Cast->getType(), C); in checkPreStmt()
129 bool ConversionChecker::isLossOfPrecision(const ImplicitCastExpr *Cast, in isLossOfPrecision() argument
133 if (Cast->isEvaluatable(C.getASTContext())) in isLossOfPrecision()
136 QualType SubType = Cast->IgnoreParenImpCasts()->getType(); in isLossOfPrecision()
181 return C.isGreaterOrEqual(Cast->getSubExpr(), MaxVal); in isLossOfPrecision()
185 bool ConversionChecker::isLossOfSign(const ImplicitCastExpr *Cast, in isLossOfSign() argument
187 QualType CastType = Cast->getType(); in isLossOfSign()
188 QualType SubType = Cast->IgnoreParenImpCasts()->getType(); in isLossOfSign()
193 return C.isNegative(Cast->getSubExpr()); in isLossOfSign()