Lines Matching refs:OpPC

56 static void diagnoseNonConstVariable(InterpState &S, CodePtr OpPC,  in diagnoseNonConstVariable()  argument
61 const SourceInfo &Loc = S.Current->getSource(OpPC); in diagnoseNonConstVariable()
75 static bool CheckActive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckActive() argument
101 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckActive()
107 static bool CheckTemporary(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckTemporary() argument
119 const SourceInfo &E = S.Current->getSource(OpPC); in CheckTemporary()
127 static bool CheckGlobal(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckGlobal() argument
135 S.FFDiag(S.Current->getLocation(OpPC), diag::note_constexpr_modify_global); in CheckGlobal()
148 void cleanupAfterFunctionCall(InterpState &S, CodePtr OpPC) { in cleanupAfterFunctionCall() argument
187 bool CheckExtern(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckExtern() argument
193 diagnoseNonConstVariable(S, OpPC, VD); in CheckExtern()
198 bool CheckArray(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckArray() argument
201 const SourceInfo &E = S.Current->getSource(OpPC); in CheckArray()
206 bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckLive() argument
209 const auto &Src = S.Current->getSource(OpPC); in CheckLive()
220 const auto &Src = S.Current->getSource(OpPC); in CheckLive()
236 bool CheckConstant(InterpState &S, CodePtr OpPC, const Descriptor *Desc) { in CheckConstant() argument
262 diagnoseNonConstVariable(S, OpPC, VD); in CheckConstant()
270 static bool CheckConstant(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckConstant() argument
271 return CheckConstant(S, OpPC, Ptr.getDeclDesc()); in CheckConstant()
274 bool CheckDummy(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckDummy() argument
278 bool CheckNull(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckNull() argument
282 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckNull()
287 bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckRange() argument
291 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckRange()
296 bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckRange() argument
300 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckRange()
305 bool CheckSubobject(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckSubobject() argument
310 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckSubobject()
315 bool CheckConst(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckConst() argument
329 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckConst()
334 bool CheckMutable(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckMutable() argument
340 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckMutable()
347 bool CheckInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckInitialized() argument
353 S.FFDiag(S.Current->getSource(OpPC), diag::note_constexpr_access_uninit) in CheckInitialized()
354 << AK << /*uninitialized=*/true << S.Current->getRange(OpPC); in CheckInitialized()
359 bool CheckLoad(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckLoad() argument
360 if (!CheckLive(S, OpPC, Ptr, AK_Read)) in CheckLoad()
362 if (!CheckConstant(S, OpPC, Ptr)) in CheckLoad()
365 if (!CheckDummy(S, OpPC, Ptr)) in CheckLoad()
367 if (!CheckExtern(S, OpPC, Ptr)) in CheckLoad()
369 if (!CheckRange(S, OpPC, Ptr, AK_Read)) in CheckLoad()
371 if (!CheckInitialized(S, OpPC, Ptr, AK_Read)) in CheckLoad()
373 if (!CheckActive(S, OpPC, Ptr, AK_Read)) in CheckLoad()
375 if (!CheckTemporary(S, OpPC, Ptr, AK_Read)) in CheckLoad()
377 if (!CheckMutable(S, OpPC, Ptr)) in CheckLoad()
382 bool CheckStore(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckStore() argument
383 if (!CheckLive(S, OpPC, Ptr, AK_Assign)) in CheckStore()
385 if (!CheckExtern(S, OpPC, Ptr)) in CheckStore()
387 if (!CheckRange(S, OpPC, Ptr, AK_Assign)) in CheckStore()
389 if (!CheckGlobal(S, OpPC, Ptr)) in CheckStore()
391 if (!CheckConst(S, OpPC, Ptr)) in CheckStore()
396 bool CheckInvoke(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckInvoke() argument
397 if (!CheckLive(S, OpPC, Ptr, AK_MemberCall)) in CheckInvoke()
399 if (!CheckExtern(S, OpPC, Ptr)) in CheckInvoke()
401 if (!CheckRange(S, OpPC, Ptr, AK_MemberCall)) in CheckInvoke()
406 bool CheckInit(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckInit() argument
407 if (!CheckLive(S, OpPC, Ptr, AK_Assign)) in CheckInit()
409 if (!CheckRange(S, OpPC, Ptr, AK_Assign)) in CheckInit()
414 bool CheckCallable(InterpState &S, CodePtr OpPC, const Function *F) { in CheckCallable() argument
417 const SourceLocation &Loc = S.Current->getLocation(OpPC); in CheckCallable()
423 const SourceLocation &Loc = S.Current->getLocation(OpPC); in CheckCallable()
463 bool CheckCallDepth(InterpState &S, CodePtr OpPC) { in CheckCallDepth() argument
465 S.FFDiag(S.Current->getSource(OpPC), in CheckCallDepth()
474 bool CheckThis(InterpState &S, CodePtr OpPC, const Pointer &This) { in CheckThis() argument
478 const SourceInfo &Loc = S.Current->getSource(OpPC); in CheckThis()
492 bool CheckPure(InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD) { in CheckPure() argument
495 const SourceInfo &E = S.Current->getSource(OpPC); in CheckPure()
501 bool CheckPotentialReinterpretCast(InterpState &S, CodePtr OpPC, in CheckPotentialReinterpretCast() argument
506 const SourceInfo &E = S.Current->getSource(OpPC); in CheckPotentialReinterpretCast()
508 << 2 << S.getLangOpts().CPlusPlus << S.Current->getRange(OpPC); in CheckPotentialReinterpretCast()
512 bool CheckFloatResult(InterpState &S, CodePtr OpPC, const Floating &Result, in CheckFloatResult() argument
514 const SourceInfo &E = S.Current->getSource(OpPC); in CheckFloatResult()
522 << /*NaN=*/true << S.Current->getRange(OpPC); in CheckFloatResult()
561 bool CheckDeclRef(InterpState &S, CodePtr OpPC, const DeclRefExpr *DR) { in CheckDeclRef() argument
563 const SourceInfo &E = S.Current->getSource(OpPC); in CheckDeclRef()
574 diagnoseNonConstVariable(S, OpPC, VD); in CheckDeclRef()
604 CodePtr OpPC = PC; in Interpret() local