Lines Matching refs:Evaluate
43 /// evaluate the expression regardless of what the RHS is, but C only allows
124 static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E);
297 // We don't want to evaluate BlockExprs multiple times, as they generate
352 if (!Evaluate(info.OpaqueValues[opaqueValue], info, value)) {
972 if (!Evaluate(Scratch, Info, E->getSubExpr()))
1179 if (Init->Evaluate(EResult, Info.Ctx) && !EResult.HasSideEffects &&
1196 /// EvaluateBuiltinClassifyType - Evaluate __builtin_classify_type the same way
1399 // If we can't evaluate the LHS, it might have side effects;
1402 if (!Evaluate(Scratch, Info, E->getLHS()))
1414 // We were able to evaluate the LHS, see if we can get away with not
1427 // We can't evaluate the LHS; however, sometimes the result
1431 // Since we weren't able to evaluate the left hand side, it
1698 /// VisitUnaryExprOrTypeTraitExpr - Evaluate a sizeof, alignof or vec_step with
1859 /// HandleCast - This is used to evaluate implicit or explicit casts where the
1996 if (!Evaluate(Scratch, Info, E->getSubExpr()))
2165 if (Init->Evaluate(InitResult, Info.Ctx) && !InitResult.HasSideEffects &&
2199 if (!Evaluate(Scratch, Info, E->getSubExpr()))
2228 // If we can't evaluate the LHS, it might have side effects;
2231 if (!Evaluate(Scratch, Info, E->getLHS()))
2237 // We can't evaluate pointer-to-member operations.
2513 // If we can't evaluate the LHS, it might have side effects;
2516 if (!Evaluate(Scratch, Info, E->getLHS()))
2669 // Top level Expr::Evaluate method.
2672 static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E) {
2706 /// Evaluate - Return true if this is a constant which we can fold using
2710 bool Expr::Evaluate(EvalResult &Result, const ASTContext &Ctx) const {
2712 return ::Evaluate(Result.Val, Info, this);
2755 /// isEvaluatable - Call Evaluate to see if this expression can be constant
2759 return Evaluate(Result, Ctx) && !Result.HasSideEffects;
2768 bool Result = Evaluate(EvalResult, Ctx);
2770 assert(Result && "Could not evaluate expression");
2771 assert(EvalResult.Val.isInt() && "Expression did not evaluate to integer");
2800 // 0: This expression is an ICE if it can be evaluated by Evaluate.
2823 if (!E->Evaluate(EVResult, Ctx) || EVResult.HasSideEffects ||
3013 // Evaluate matches the proposed gcc behavior for cases like
3066 // Evaluate gives an error for undefined Div/Rem, so make sure
3067 // we don't evaluate one.
3170 if (!E->Evaluate(EVResult, Ctx) || EVResult.HasSideEffects ||
3228 if (!Evaluate(EvalResult, Ctx))