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

Declarations

tools/clang/lib/AST/ExprConstant.cpp
   72   class EvalInfo;

References

tools/clang/lib/AST/ExprConstant.cpp
  383     bool checkSubobject(EvalInfo &Info, const Expr *E, CheckSubobjectKind CSK);
  440     void diagnoseUnsizedArrayPointerArithmetic(EvalInfo &Info, const Expr *E);
  441     void diagnosePointerArithmetic(EvalInfo &Info, const Expr *E,
  444     void adjustIndex(EvalInfo &Info, const Expr *E, APSInt N) {
  492     EvalInfo &Info;
  549     CallStackFrame(EvalInfo &Info, SourceLocation CallLoc,
  623 static bool HandleDestruction(EvalInfo &Info, const Expr *E,
  625 static bool HandleDestruction(EvalInfo &Info, SourceLocation Loc,
  642     bool endLifetime(EvalInfo &Info, bool RunDestructors) {
  811       EvalInfo &EI;
  814       EvaluatingConstructorRAII(EvalInfo &EI, ObjectUnderConstruction Object,
  832       EvalInfo &EI;
  835       EvaluatingDestructorRAII(EvalInfo &EI, ObjectUnderConstruction Object)
 1179       EvalInfo &Info;
 1183       ArrayInitLoopIndex(EvalInfo &Info)
 1195     EvalInfo &Info;
 1198     EvalInfo::EvaluationMode OldMode;
 1200     explicit FoldConstant(EvalInfo &Info, bool Enabled)
 1208         Info.EvalMode = EvalInfo::EM_ConstantFold;
 1222     EvalInfo &Info;
 1223     EvalInfo::EvaluationMode OldMode;
 1224     explicit IgnoreSideEffectsRAII(EvalInfo &Info)
 1226       Info.EvalMode = EvalInfo::EM_IgnoreSideEffects;
 1235     EvalInfo *Info = nullptr;
 1258         EvalInfo &Info, SmallVectorImpl<PartialDiagnosticAt> *NewDiag = nullptr)
 1283     EvalInfo &Info;
 1286     ScopeRAII(EvalInfo &Info)
 1305     static bool cleanup(EvalInfo &Info, bool RunDestructors,
 1337 bool SubobjectDesignator::checkSubobject(EvalInfo &Info, const Expr *E,
 1353 void SubobjectDesignator::diagnoseUnsizedArrayPointerArithmetic(EvalInfo &Info,
 1360 void SubobjectDesignator::diagnosePointerArithmetic(EvalInfo &Info,
 1375 CallStackFrame::CallStackFrame(EvalInfo &Info, SourceLocation CallLoc,
 1549     bool checkNullPointer(EvalInfo &Info, const Expr *E,
 1556     bool checkNullPointerForFoldAccess(EvalInfo &Info, const Expr *E,
 1565     bool checkSubobject(EvalInfo &Info, const Expr *E, CheckSubobjectKind CSK) {
 1570     void addDecl(EvalInfo &Info, const Expr *E,
 1575     void addUnsizedArray(EvalInfo &Info, const Expr *E, QualType ElemTy) {
 1587     void addArray(EvalInfo &Info, const Expr *E, const ConstantArrayType *CAT) {
 1591     void addComplex(EvalInfo &Info, const Expr *E, QualType EltTy, bool Imag) {
 1598     void adjustOffsetAndIndex(EvalInfo &Info, const Expr *E,
 1723 static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E);
 1724 static bool EvaluateInPlace(APValue &Result, EvalInfo &Info,
 1727 static bool EvaluateLValue(const Expr *E, LValue &Result, EvalInfo &Info,
 1729 static bool EvaluatePointer(const Expr *E, LValue &Result, EvalInfo &Info,
 1732                                   EvalInfo &Info);
 1733 static bool EvaluateTemporary(const Expr *E, LValue &Result, EvalInfo &Info);
 1734 static bool EvaluateInteger(const Expr *E, APSInt &Result, EvalInfo &Info);
 1736                                     EvalInfo &Info);
 1737 static bool EvaluateFloat(const Expr *E, APFloat &Result, EvalInfo &Info);
 1738 static bool EvaluateComplex(const Expr *E, ComplexValue &Res, EvalInfo &Info);
 1740                            EvalInfo &Info);
 1741 static bool EvaluateAsRValue(EvalInfo &Info, const Expr *E, APValue &Result);
 1745                                         EvalInfo &Info);
 1749                                EvalInfo &Info);
 1841 static bool EvaluateIgnoredValue(EvalInfo &Info, const Expr *E) {
 1964 static void NoteLValueLocation(EvalInfo &Info, APValue::LValueBase Base) {
 1991                                   EvalInfo &Info, SourceLocation DiagLoc,
 2000 static bool CheckLValueConstantExpression(EvalInfo &Info, SourceLocation Loc,
 2109 static bool CheckMemberPointerConstantExpression(EvalInfo &Info,
 2124 static bool CheckLiteralType(EvalInfo &Info, const Expr *E,
 2155                                   EvalInfo &Info, SourceLocation DiagLoc,
 2239 CheckConstantExpression(EvalInfo &Info, SourceLocation DiagLoc, QualType Type,
 2250 static bool CheckFullyInitialized(EvalInfo &Info, SourceLocation DiagLoc,
 2260 static bool CheckMemoryLeaks(EvalInfo &Info) {
 2326                                        EvalInfo &Info) {
 2335 static bool HandleOverflow(EvalInfo &Info, const Expr *E,
 2342 static bool HandleFloatToIntCast(EvalInfo &Info, const Expr *E,
 2357 static bool HandleFloatToFloatCast(EvalInfo &Info, const Expr *E,
 2367 static APSInt HandleIntToIntCast(EvalInfo &Info, const Expr *E,
 2380 static bool HandleIntToFloatCast(EvalInfo &Info, const Expr *E,
 2389 static bool truncateBitfieldValue(EvalInfo &Info, const Expr *E,
 2410 static bool EvalAndBitcastToAPInt(EvalInfo &Info, const Expr *E,
 2461 static bool CheckedIntArithmetic(EvalInfo &Info, const Expr *E,
 2484 static bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS,
 2586 static bool handleFloatFloatBinOp(EvalInfo &Info, const Expr *E,
 2624 static bool CastToDerivedClass(EvalInfo &Info, const Expr *E, LValue &Result,
 2653 static bool HandleLValueDirectBase(EvalInfo &Info, const Expr *E, LValue &Obj,
 2667 static bool HandleLValueBase(EvalInfo &Info, const Expr *E, LValue &Obj,
 2692 static bool HandleLValueBasePath(EvalInfo &Info, const CastExpr *E,
 2706 static bool CastToBaseClass(EvalInfo &Info, const Expr *E, LValue &Result,
 2722 static bool HandleLValueMember(EvalInfo &Info, const Expr *E, LValue &LVal,
 2737 static bool HandleLValueIndirectMember(EvalInfo &Info, const Expr *E,
 2747 static bool HandleSizeof(EvalInfo &Info, SourceLocation Loc,
 2778 static bool HandleLValueArrayAdjustment(EvalInfo &Info, const Expr *E,
 2789 static bool HandleLValueArrayAdjustment(EvalInfo &Info, const Expr *E,
 2801 static bool HandleLValueComplexElement(EvalInfo &Info, const Expr *E,
 2822 static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E,
 2929 static APSInt extractStringLiteralCharacter(EvalInfo &Info, const Expr *Lit,
 2962 static void expandStringLiteral(EvalInfo &Info, const StringLiteral *S,
 3030 static bool diagnoseMutableFields(EvalInfo &Info, const Expr *E, AccessKinds AK,
 3063 static bool lifetimeStartedInEvaluation(EvalInfo &Info,
 3077   case EvalInfo::EvaluatingDeclKind::None:
 3080   case EvalInfo::EvaluatingDeclKind::Ctor:
 3092   case EvalInfo::EvaluatingDeclKind::Dtor:
 3127   bool mayAccessMutableMembers(EvalInfo &Info, AccessKinds AK) const {
 3157 findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj,
 3357   EvalInfo &Info;
 3382 static bool extractSubobject(EvalInfo &Info, const Expr *E,
 3393   EvalInfo &Info;
 3440 static bool modifySubobject(EvalInfo &Info, const Expr *E,
 3507 static CompleteObject findCompleteObject(EvalInfo &Info, const Expr *E,
 3727 handleLValueToRValueConversion(EvalInfo &Info, const Expr *Conv, QualType Type,
 3783 static bool handleAssignment(EvalInfo &Info, const Expr *E, const LValue &LVal,
 3799   EvalInfo &Info;
 3907     EvalInfo &Info, const Expr *E,
 3926   EvalInfo &Info;
 4052 static bool handleIncDec(EvalInfo &Info, const Expr *E, const LValue &LVal,
 4069 static bool EvaluateObjectArgument(EvalInfo &Info, const Expr *Object,
 4095 static const ValueDecl *HandleMemberPointerAccess(EvalInfo &Info,
 4177 static const ValueDecl *HandleMemberPointerAccess(EvalInfo &Info,
 4197 static bool HandleBaseToDerivedCast(EvalInfo &Info, const CastExpr *E,
 4284 static bool EvaluateVarDecl(EvalInfo &Info, const VarDecl *VD) {
 4312 static bool EvaluateDecl(EvalInfo &Info, const Decl *D) {
 4328 static bool EvaluateCond(EvalInfo &Info, const VarDecl *CondDecl,
 4362 static EvalStmtResult EvaluateStmt(StmtResult &Result, EvalInfo &Info,
 4367 static EvalStmtResult EvaluateLoopBody(StmtResult &Result, EvalInfo &Info,
 4391 static EvalStmtResult EvaluateSwitch(StmtResult &Result, EvalInfo &Info,
 4464 static EvalStmtResult EvaluateStmt(StmtResult &Result, EvalInfo &Info,
 4859 static bool CheckTrivialDefaultConstructor(EvalInfo &Info, SourceLocation Loc,
 4884 static bool CheckConstexprFunction(EvalInfo &Info, SourceLocation CallLoc,
 4959 static bool checkDynamicType(EvalInfo &Info, const Expr *E, const LValue &This,
 5001 checkNonVirtualMemberCallThisPointer(EvalInfo &Info, const Expr *E,
 5026 static Optional<DynamicType> ComputeDynamicType(EvalInfo &Info, const Expr *E,
 5081     EvalInfo &Info, const Expr *E, LValue &This, const CXXMethodDecl *Found,
 5145 static bool HandleCovariantReturnAdjustment(EvalInfo &Info, const Expr *E,
 5186 static bool HandleDynamicCast(EvalInfo &Info, const ExplicitCastExpr *E,
 5318 static bool HandleUnionActiveMemberChange(EvalInfo &Info, const Expr *LHSExpr,
 5433                          EvalInfo &Info, const FunctionDecl *Callee) {
 5475                                EvalInfo &Info, APValue &Result,
 5538                                   EvalInfo &Info, APValue &Result) {
 5549   EvalInfo::EvaluatingConstructorRAII EvalObj(
 5736                                   EvalInfo &Info, APValue &Result) {
 5745 static bool HandleDestructionImpl(EvalInfo &Info, SourceLocation CallLoc,
 5842   EvalInfo::EvaluatingDestructorRAII EvalObj(
 5913   EvalInfo &Info;
 5937 static bool HandleDestruction(EvalInfo &Info, const Expr *E,
 5945 static bool HandleDestruction(EvalInfo &Info, SourceLocation Loc,
 5959 static bool HandleOperatorNewCall(EvalInfo &Info, const CallExpr *E,
 6041 static Optional<DynAlloc *> CheckDeleteKind(EvalInfo &Info, const Expr *E,
 6089 bool HandleOperatorDeleteCall(EvalInfo &Info, const CallExpr *E) {
 6176   EvalInfo &Info;
 6180   APValueToBufferConverter(EvalInfo &Info, CharUnits ObjectWidth,
 6316   static Optional<BitCastBuffer> convert(EvalInfo &Info, const APValue &Src,
 6328   EvalInfo &Info;
 6332   BufferToAPValueConverter(EvalInfo &Info, const BitCastBuffer &Buffer,
 6504   static Optional<APValue> convert(EvalInfo &Info, BitCastBuffer &Buffer,
 6512                                                  QualType Ty, EvalInfo *Info,
 6563 static bool checkBitCastConstexprEligibility(EvalInfo *Info,
 6574 static bool handleLValueToRValueBitCast(EvalInfo &Info, APValue &DestValue,
 6669   EvalInfo &Info;
 6680   ExprEvaluatorBase(EvalInfo &Info) : Info(Info) {}
 6682   EvalInfo &getEvalInfo() { return Info; }
 7198   LValueExprEvaluatorBase(EvalInfo &Info, LValue &Result, bool InvalidBaseOK)
 7317   LValueExprEvaluator(EvalInfo &Info, LValue &Result, bool InvalidBaseOK) :
 7376 static bool EvaluateLValue(const Expr *E, LValue &Result, EvalInfo &Info,
 7761 static bool evaluateLValueAsAllocSize(EvalInfo &Info, APValue::LValueBase Base,
 7815   PointerExprEvaluator(EvalInfo &info, LValue &Result, bool InvalidBaseOK)
 7899 static bool EvaluatePointer(const Expr* E, LValue& Result, EvalInfo &Info,
 8064 static CharUnits GetAlignOfType(EvalInfo &Info, QualType T,
 8091 static CharUnits GetAlignOfExpr(EvalInfo &Info, const Expr *E,
 8462 static bool EvaluateArrayNewInitList(EvalInfo &Info, LValue &This,
 8593       EvalInfo &Info;
 8673   MemberPointerExprEvaluator(EvalInfo &Info, MemberPtr &Result)
 8690                                   EvalInfo &Info) {
 8757     RecordExprEvaluator(EvalInfo &info, const LValue &This, APValue &Result)
 8792 static bool HandleClassZeroInitialization(EvalInfo &Info, const Expr *E,
 8904   EvalInfo::EvaluatingConstructorRAII EvalObj(
 9157                            APValue &Result, EvalInfo &Info) {
 9174   TemporaryExprEvaluator(EvalInfo &Info, LValue &Result) :
 9212 static bool EvaluateTemporary(const Expr *E, LValue &Result, EvalInfo &Info) {
 9227     VectorExprEvaluator(EvalInfo &info, APValue &Result)
 9254 static bool EvaluateVector(const Expr* E, APValue& Result, EvalInfo &Info) {
 9409     ArrayExprEvaluator(EvalInfo &Info, const LValue &This, APValue &Result)
 9454                           APValue &Result, EvalInfo &Info) {
 9459 static bool EvaluateArrayNewInitList(EvalInfo &Info, LValue &This,
 9577   for (EvalInfo::ArrayInitLoopIndex Index(Info); Index != Elements; ++Index) {
 9648   IntExprEvaluator(EvalInfo &info, APValue &result)
 9791   FixedPointExprEvaluator(EvalInfo &info, APValue &result)
 9839                                     EvalInfo &Info) {
 9844 static bool EvaluateInteger(const Expr *E, APSInt &Result, EvalInfo &Info) {
 9865                                EvalInfo &Info) {
 9880                                         EvalInfo &Info) {
10127 static bool EvaluateBuiltinConstantP(EvalInfo &Info, const Expr *Arg) {
10362 static bool determineEndOffset(EvalInfo &Info, SourceLocation ExprLoc,
10445                                          EvalInfo &Info, uint64_t &Size) {
10524     case EvalInfo::EM_ConstantExpression:
10525     case EvalInfo::EM_ConstantFold:
10526     case EvalInfo::EM_IgnoreSideEffects:
10529     case EvalInfo::EM_ConstantExpressionUnevaluated:
11126     void startSpeculativeEval(EvalInfo &Info) {
11137   EvalInfo &Info;
11412   EvalInfo &Info;
11416   DelayedNoteFailureRAII(EvalInfo &Info, bool NoteFailure = true)
11431 EvaluateComparisonBinaryOperator(EvalInfo &Info, const BinaryOperator *E,
12376   FloatExprEvaluator(EvalInfo &info, APFloat &result)
12403 static bool EvaluateFloat(const Expr* E, APFloat& Result, EvalInfo &Info) {
12612   ComplexExprEvaluator(EvalInfo &info, ComplexValue &Result)
12635                             EvalInfo &Info) {
13110   AtomicExprEvaluator(EvalInfo &Info, const LValue *This, APValue &Result)
13140                            EvalInfo &Info) {
13154   VoidExprEvaluator(EvalInfo &Info) : ExprEvaluatorBaseTy(Info) {}
13264 static bool EvaluateVoid(const Expr *E, EvalInfo &Info) {
13273 static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E) {
13355 static bool EvaluateInPlace(APValue &Result, EvalInfo &Info, const LValue &This,
13383 static bool EvaluateAsRValue(EvalInfo &Info, const Expr *E, APValue &Result) {
13453                              const ASTContext &Ctx, EvalInfo &Info) {
13464                           EvalInfo &Info) {
13479                                  EvalInfo &Info) {
13502   EvalInfo Info(Ctx, Result, EvalInfo::EM_IgnoreSideEffects);
13502   EvalInfo Info(Ctx, Result, EvalInfo::EM_IgnoreSideEffects);
13521   EvalInfo Info(Ctx, Result, EvalInfo::EM_IgnoreSideEffects);
13521   EvalInfo Info(Ctx, Result, EvalInfo::EM_IgnoreSideEffects);
13531   EvalInfo Info(Ctx, Result, EvalInfo::EM_IgnoreSideEffects);
13531   EvalInfo Info(Ctx, Result, EvalInfo::EM_IgnoreSideEffects);
13560   EvalInfo Info(Ctx, Result, EvalInfo::EM_ConstantFold);
13560   EvalInfo Info(Ctx, Result, EvalInfo::EM_ConstantFold);
13580   EvalInfo::EvaluationMode EM = EvalInfo::EM_ConstantExpression;
13580   EvalInfo::EvaluationMode EM = EvalInfo::EM_ConstantExpression;
13581   EvalInfo Info(Ctx, Result, EM);
13610   EvalInfo Info(Ctx, EStatus, VD->isConstexpr()
13611                                       ? EvalInfo::EM_ConstantExpression
13612                                       : EvalInfo::EM_ConstantFold);
13676   EvalInfo Info(getASTContext(), EStatus, EvalInfo::EM_ConstantExpression);
13676   EvalInfo Info(getASTContext(), EStatus, EvalInfo::EM_ConstantExpression);
13678                          EvalInfo::EvaluatingDeclKind::Dtor);
13718   EvalInfo Info(Ctx, EVResult, EvalInfo::EM_IgnoreSideEffects);
13718   EvalInfo Info(Ctx, EVResult, EvalInfo::EM_IgnoreSideEffects);
13736   EvalInfo Info(Ctx, EVResult, EvalInfo::EM_IgnoreSideEffects);
13736   EvalInfo Info(Ctx, EVResult, EvalInfo::EM_IgnoreSideEffects);
13755     EvalInfo Info(Ctx, EVResult, EvalInfo::EM_IgnoreSideEffects);
13755     EvalInfo Info(Ctx, EVResult, EvalInfo::EM_IgnoreSideEffects);
13811   EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantExpression);
13811   EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantExpression);
14274   EvalInfo Info(Ctx, Status, EvalInfo::EM_IgnoreSideEffects);
14274   EvalInfo Info(Ctx, Status, EvalInfo::EM_IgnoreSideEffects);
14304   EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantExpression);
14304   EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantExpression);
14332   EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantExpressionUnevaluated);
14332   EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantExpressionUnevaluated);
14379   EvalInfo Info(FD->getASTContext(), Status, EvalInfo::EM_ConstantExpression);
14379   EvalInfo Info(FD->getASTContext(), Status, EvalInfo::EM_ConstantExpression);
14431   EvalInfo Info(FD->getASTContext(), Status,
14432                 EvalInfo::EM_ConstantExpressionUnevaluated);
14456   EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantFold);
14456   EvalInfo Info(Ctx, Status, EvalInfo::EM_ConstantFold);