reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/lib/AST/ExprConstant.cpp
10503   switch (unsigned BuiltinOp = E->getBuiltinCallee()) {
10505     return ExprEvaluatorBaseTy::VisitCallExpr(E);
10511         E->getArg(1)->EvaluateKnownConstInt(Info.Ctx).getZExtValue();
10515     if (tryEvaluateBuiltinObjectSize(E->getArg(0), Type, Info, Size))
10516       return Success(Size, E);
10518     if (E->getArg(0)->HasSideEffects(Info.Ctx))
10519       return Success((Type & 2) ? 0 : -1, E);
10528       return Error(E);
10531       return Success((Type & 2) ? 0 : -1, E);
10539     analyze_os_log::computeOSLogBufferLayout(Info.Ctx, E, Layout);
10540     return Success(Layout.size().getQuantity(), E);
10547     if (!EvaluateInteger(E->getArg(0), Val, Info))
10550     return Success(Val.byteSwap(), E);
10554     return Success((int)EvaluateBuiltinClassifyType(E, Info.getLangOpts()), E);
10554     return Success((int)EvaluateBuiltinClassifyType(E, Info.getLangOpts()), E);
10560     if (!EvaluateInteger(E->getArg(0), Val, Info))
10563     return Success(Val.getBitWidth() - Val.getMinSignedBits(), E);
10571     if (!EvaluateInteger(E->getArg(0), Val, Info))
10574       return Error(E);
10576     return Success(Val.countLeadingZeros(), E);
10580     const Expr *Arg = E->getArg(0);
10582       return Success(true, E);
10587       return Success(false, E);
10589     Info.FFDiag(E, diag::note_invalid_subexpr_in_const_expr);
10594     return Success(Info.InConstantContext, E);
10601     if (!EvaluateInteger(E->getArg(0), Val, Info))
10604       return Error(E);
10606     return Success(Val.countTrailingZeros(), E);
10610     int Operand = E->getArg(0)->EvaluateKnownConstInt(Info.Ctx).getZExtValue();
10612     return Success(Operand, E);
10616     return Visit(E->getArg(0));
10622     if (!EvaluateInteger(E->getArg(0), Val, Info))
10626     return Success(N == Val.getBitWidth() ? 0 : N + 1, E);
10631     if (!EvaluateFloat(E->getArg(5), Val, Info))
10640     return Visit(E->getArg(Arg));
10645     return EvaluateFloat(E->getArg(0), Val, Info) &&
10646            Success(Val.isInfinity() ? (Val.isNegative() ? -1 : 1) : 0, E);
10651     return EvaluateFloat(E->getArg(0), Val, Info) &&
10652            Success(Val.isInfinity() ? 1 : 0, E);
10657     return EvaluateFloat(E->getArg(0), Val, Info) &&
10658            Success(Val.isFinite() ? 1 : 0, E);
10663     return EvaluateFloat(E->getArg(0), Val, Info) &&
10664            Success(Val.isNaN() ? 1 : 0, E);
10669     return EvaluateFloat(E->getArg(0), Val, Info) &&
10670            Success(Val.isNormal() ? 1 : 0, E);
10677     if (!EvaluateInteger(E->getArg(0), Val, Info))
10680     return Success(Val.countPopulation() % 2, E);
10687     if (!EvaluateInteger(E->getArg(0), Val, Info))
10690     return Success(Val.countPopulation(), E);
10697       Info.CCEDiag(E, diag::note_constexpr_invalid_function)
10701       Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
10708     if (!EvaluatePointer(E->getArg(0), String, Info))
10711     QualType CharTy = E->getArg(0)->getType()->getPointeeType();
10730         return Success(Str.size(), E);
10739       if (!handleLValueToRValueConversion(Info, E, CharTy, String, Char) ||
10743         return Success(Strlen, E);
10744       if (!HandleLValueArrayAdjustment(Info, E, String, CharTy, 1))
10758       Info.CCEDiag(E, diag::note_constexpr_invalid_function)
10762       Info.CCEDiag(E, diag::note_invalid_subexpr_in_const_expr);
10772     if (!EvaluatePointer(E->getArg(0), String1, Info) ||
10773         !EvaluatePointer(E->getArg(1), String2, Info))
10782       if (!EvaluateInteger(E->getArg(2), N, Info))
10789       return Success(0, E);
10791     if (!String1.checkNullPointerForFoldAccess(Info, E, AK_Read) ||
10792         !String2.checkNullPointerForFoldAccess(Info, E, AK_Read) ||
10806                 CharTy1, E->getArg(0)->getType()->getPointeeType()) &&
10810       return handleLValueToRValueConversion(Info, E, CharTy1, String1, Char1) &&
10811              handleLValueToRValueConversion(Info, E, CharTy2, String2, Char2) &&
10815       return HandleLValueArrayAdjustment(Info, E, String1, CharTy1, 1) &&
10816              HandleLValueArrayAdjustment(Info, E, String2, CharTy2, 1);
10823         Info.FFDiag(E, diag::note_constexpr_ltor_incomplete_type) << CharTy1;
10827         Info.FFDiag(E, diag::note_constexpr_ltor_incomplete_type) << CharTy2;
10854             return Success(Char1InMem.ult(Char2InMem) ? -1 : 1, E);
10867       return Success(0, E);
10889           return Success(Char1.getInt() < Char2.getInt() ? -1 : 1, E);
10891         return Success(Char1.getInt().ult(Char2.getInt()) ? -1 : 1, E);
10894         return Success(0, E);
10900     return Success(0, E);
10907     if (!EvaluateInteger(E->getArg(0), SizeVal, Info))
10928             E->getArg(1)->isNullPointerConstant(Info.Ctx,
10932           return Success(1, E);
10934         QualType PointeeType = E->getArg(1)->IgnoreImpCasts()->getType()->
10939           return Success(1, E);
10945         Success(0, E) : Error(E);
10945         Success(0, E) : Error(E);
10949     return Success(Info.getLangOpts().OpenMPIsDevice ? 0 : 1, E);
10974     QualType ResultType = E->getArg(2)->getType()->getPointeeType();
10975     if (!EvaluateInteger(E->getArg(0), LHS, Info) ||
10976         !EvaluateInteger(E->getArg(1), RHS, Info) ||
10977         !EvaluatePointer(E->getArg(2), ResultLValue, Info))
11063     if (!handleAssignment(Info, E, ResultLValue, ResultType, APV))
11065     return Success(DidOverflow, E);