Lines Matching refs:Cast
42 void checkPreStmt(const ImplicitCastExpr *Cast, CheckerContext &C) const;
47 bool isLossOfPrecision(const ImplicitCastExpr *Cast, QualType DestType,
50 bool isLossOfSign(const ImplicitCastExpr *Cast, CheckerContext &C) const;
56 void ConversionChecker::checkPreStmt(const ImplicitCastExpr *Cast, in checkPreStmt() argument
60 if (!isa<DeclRefExpr>(Cast->IgnoreParenImpCasts())) in checkPreStmt()
64 if (Cast->getExprLoc().isMacroID()) in checkPreStmt()
69 const Stmt *Parent = PM.getParent(Cast); in checkPreStmt()
80 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
81 LossOfPrecision = isLossOfPrecision(Cast, Cast->getType(), C); in checkPreStmt()
84 LossOfPrecision = isLossOfPrecision(Cast, B->getLHS()->getType(), C); in checkPreStmt()
86 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
87 LossOfPrecision = isLossOfPrecision(Cast, B->getLHS()->getType(), C); in checkPreStmt()
89 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
92 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
95 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
96 LossOfPrecision = isLossOfPrecision(Cast, B->getLHS()->getType(), C); in checkPreStmt()
98 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
101 LossOfSign = isLossOfSign(Cast, C); in checkPreStmt()
102 LossOfPrecision = isLossOfPrecision(Cast, Cast->getType(), C); in checkPreStmt()
128 bool ConversionChecker::isLossOfPrecision(const ImplicitCastExpr *Cast, in isLossOfPrecision() argument
132 if (Cast->isEvaluatable(C.getASTContext())) in isLossOfPrecision()
135 QualType SubType = Cast->IgnoreParenImpCasts()->getType(); in isLossOfPrecision()
180 return C.isGreaterOrEqual(Cast->getSubExpr(), MaxVal); in isLossOfPrecision()
184 bool ConversionChecker::isLossOfSign(const ImplicitCastExpr *Cast, in isLossOfSign() argument
186 QualType CastType = Cast->getType(); in isLossOfSign()
187 QualType SubType = Cast->IgnoreParenImpCasts()->getType(); in isLossOfSign()
192 return C.isNegative(Cast->getSubExpr()); in isLossOfSign()