Lines Matching refs:OpPC

61 static void diagnoseMissingInitializer(InterpState &S, CodePtr OpPC,  in diagnoseMissingInitializer()  argument
63 const SourceInfo &E = S.Current->getSource(OpPC); in diagnoseMissingInitializer()
68 static void diagnoseNonConstVariable(InterpState &S, CodePtr OpPC,
70 static bool diagnoseUnknownDecl(InterpState &S, CodePtr OpPC, in diagnoseUnknownDecl() argument
72 const SourceInfo &E = S.Current->getSource(OpPC); in diagnoseUnknownDecl()
85 diagnoseNonConstVariable(S, OpPC, D); in diagnoseUnknownDecl()
88 diagnoseMissingInitializer(S, OpPC, VD); in diagnoseUnknownDecl()
93 static void diagnoseNonConstVariable(InterpState &S, CodePtr OpPC, in diagnoseNonConstVariable() argument
98 const SourceInfo &Loc = S.Current->getSource(OpPC); in diagnoseNonConstVariable()
102 diagnoseMissingInitializer(S, OpPC, VD); in diagnoseNonConstVariable()
125 static bool CheckActive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckActive() argument
151 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckActive()
157 static bool CheckTemporary(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckTemporary() argument
169 const SourceInfo &E = S.Current->getSource(OpPC); in CheckTemporary()
177 static bool CheckGlobal(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckGlobal() argument
185 S.FFDiag(S.Current->getLocation(OpPC), diag::note_constexpr_modify_global); in CheckGlobal()
198 void cleanupAfterFunctionCall(InterpState &S, CodePtr OpPC) { in cleanupAfterFunctionCall() argument
248 bool CheckExtern(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckExtern() argument
258 diagnoseNonConstVariable(S, OpPC, VD); in CheckExtern()
263 bool CheckArray(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckArray() argument
266 const SourceInfo &E = S.Current->getSource(OpPC); in CheckArray()
271 bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckLive() argument
274 const auto &Src = S.Current->getSource(OpPC); in CheckLive()
285 const auto &Src = S.Current->getSource(OpPC); in CheckLive()
301 bool CheckConstant(InterpState &S, CodePtr OpPC, const Descriptor *Desc) { in CheckConstant() argument
328 diagnoseNonConstVariable(S, OpPC, D); in CheckConstant()
335 static bool CheckConstant(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckConstant() argument
338 return CheckConstant(S, OpPC, Ptr.getDeclDesc()); in CheckConstant()
341 bool CheckNull(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckNull() argument
345 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckNull()
347 << CSK << S.Current->getRange(OpPC); in CheckNull()
352 bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckRange() argument
356 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckRange()
358 << AK << S.Current->getRange(OpPC); in CheckRange()
362 bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckRange() argument
366 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckRange()
368 << CSK << S.Current->getRange(OpPC); in CheckRange()
372 bool CheckSubobject(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckSubobject() argument
377 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckSubobject()
379 << CSK << S.Current->getRange(OpPC); in CheckSubobject()
383 bool CheckDowncast(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckDowncast() argument
393 const auto *E = cast<CastExpr>(S.Current->getExpr(OpPC)); in CheckDowncast()
403 bool CheckConst(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckConst() argument
426 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckConst()
431 bool CheckMutable(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckMutable() argument
442 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckMutable()
449 bool CheckVolatile(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckVolatile() argument
462 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckVolatile()
470 bool CheckInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckInitialized() argument
479 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckInitialized()
484 diagnoseMissingInitializer(S, OpPC, VD); in CheckInitialized()
490 S.FFDiag(S.Current->getSource(OpPC), diag::note_constexpr_access_uninit) in CheckInitialized()
491 << AK << /*uninitialized=*/true << S.Current->getRange(OpPC); in CheckInitialized()
496 bool CheckGlobalInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckGlobalInitialized() argument
506 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckGlobalInitialized()
513 bool CheckLoad(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckLoad() argument
515 if (!CheckLive(S, OpPC, Ptr, AK)) in CheckLoad()
517 if (!CheckConstant(S, OpPC, Ptr)) in CheckLoad()
520 if (!CheckDummy(S, OpPC, Ptr, AK)) in CheckLoad()
522 if (!CheckExtern(S, OpPC, Ptr)) in CheckLoad()
524 if (!CheckRange(S, OpPC, Ptr, AK)) in CheckLoad()
526 if (!CheckActive(S, OpPC, Ptr, AK)) in CheckLoad()
528 if (!CheckInitialized(S, OpPC, Ptr, AK)) in CheckLoad()
530 if (!CheckTemporary(S, OpPC, Ptr, AK)) in CheckLoad()
532 if (!CheckMutable(S, OpPC, Ptr)) in CheckLoad()
534 if (!CheckVolatile(S, OpPC, Ptr, AK)) in CheckLoad()
539 bool CheckStore(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckStore() argument
540 if (!CheckLive(S, OpPC, Ptr, AK_Assign)) in CheckStore()
542 if (!CheckDummy(S, OpPC, Ptr, AK_Assign)) in CheckStore()
544 if (!CheckExtern(S, OpPC, Ptr)) in CheckStore()
546 if (!CheckRange(S, OpPC, Ptr, AK_Assign)) in CheckStore()
548 if (!CheckGlobal(S, OpPC, Ptr)) in CheckStore()
550 if (!CheckConst(S, OpPC, Ptr)) in CheckStore()
555 bool CheckInvoke(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckInvoke() argument
556 if (!CheckLive(S, OpPC, Ptr, AK_MemberCall)) in CheckInvoke()
559 if (!CheckExtern(S, OpPC, Ptr)) in CheckInvoke()
561 if (!CheckRange(S, OpPC, Ptr, AK_MemberCall)) in CheckInvoke()
567 bool CheckInit(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckInit() argument
568 if (!CheckLive(S, OpPC, Ptr, AK_Assign)) in CheckInit()
570 if (!CheckRange(S, OpPC, Ptr, AK_Assign)) in CheckInit()
575 bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) { in CheckCallable() argument
578 const SourceLocation &Loc = S.Current->getLocation(OpPC); in CheckCallable()
591 const SourceLocation &Loc = S.Current->getLocation(OpPC); in CheckCallable()
641 bool CheckCallDepth(InterpState &S, CodePtr OpPC) { in CheckCallDepth() argument
643 S.FFDiag(S.Current->getSource(OpPC), in CheckCallDepth()
652 bool CheckThis(InterpState &S, CodePtr OpPC, const Pointer &This) { in CheckThis() argument
656 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckThis()
670 bool CheckPure(InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD) { in CheckPure() argument
673 const SourceInfo &E = S.Current->getSource(OpPC); in CheckPure()
679 bool CheckFloatResult(InterpState &S, CodePtr OpPC, const Floating &Result, in CheckFloatResult() argument
681 const SourceInfo &E = S.Current->getSource(OpPC); in CheckFloatResult()
689 << /*NaN=*/true << S.Current->getRange(OpPC); in CheckFloatResult()
726 bool CheckDynamicMemoryAllocation(InterpState &S, CodePtr OpPC) { in CheckDynamicMemoryAllocation() argument
730 const SourceInfo &E = S.Current->getSource(OpPC); in CheckDynamicMemoryAllocation()
735 bool CheckNewDeleteForms(InterpState &S, CodePtr OpPC, bool NewWasArray, in CheckNewDeleteForms() argument
753 const SourceInfo &E = S.Current->getSource(OpPC); in CheckNewDeleteForms()
761 bool CheckDeleteSource(InterpState &S, CodePtr OpPC, const Expr *Source, in CheckDeleteSource() argument
767 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckDeleteSource()
780 bool CheckDeclRef(InterpState &S, CodePtr OpPC, const DeclRefExpr *DR) { in CheckDeclRef() argument
782 return diagnoseUnknownDecl(S, OpPC, D); in CheckDeclRef()
785 bool CheckDummy(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckDummy() argument
796 return diagnoseUnknownDecl(S, OpPC, D); in CheckDummy()
800 const SourceInfo &E = S.Current->getSource(OpPC); in CheckDummy()
806 bool CheckNonNullArgs(InterpState &S, CodePtr OpPC, const Function *F, in CheckNonNullArgs() argument
816 const SourceLocation &Loc = S.Current->getLocation(OpPC); in CheckNonNullArgs()
833 static bool runRecordDestructor(InterpState &S, CodePtr OpPC, in runRecordDestructor() argument
844 if (!runRecordDestructor(S, OpPC, BasePtr.atField(Field.Offset), D)) in runRecordDestructor()
850 if (!runRecordDestructor(S, OpPC, BasePtr.atIndex(I).narrow(), in runRecordDestructor()
865 if (!Call(S, OpPC, DtorFunc, 0)) in runRecordDestructor()
871 if (!runRecordDestructor(S, OpPC, BasePtr.atField(Base.Offset), Base.Desc)) in runRecordDestructor()
878 bool RunDestructors(InterpState &S, CodePtr OpPC, const Block *B) { in RunDestructors() argument
893 if (!runRecordDestructor(S, OpPC, RP.atIndex(I).narrow(), ElemDesc)) in RunDestructors()
900 return runRecordDestructor(S, OpPC, Pointer(const_cast<Block *>(B)), Desc); in RunDestructors()
903 void diagnoseEnumValue(InterpState &S, CodePtr OpPC, const EnumDecl *ED, in diagnoseEnumValue() argument
916 const SourceLocation &Loc = S.Current->getLocation(OpPC); in diagnoseEnumValue()
921 const SourceLocation &Loc = S.Current->getLocation(OpPC); in diagnoseEnumValue()
947 CodePtr OpPC = PC; in Interpret() local