Lines Matching refs:Ptr
101 static bool CheckInitialized(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckInitialized() argument
103 if (Ptr.isInitialized()) in CheckInitialized()
112 static bool CheckActive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckActive() argument
114 if (Ptr.isActive()) in CheckActive()
118 const FieldDecl *InactiveField = Ptr.getField(); in CheckActive()
121 Pointer U = Ptr.getBase(); in CheckActive()
144 static bool CheckTemporary(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckTemporary() argument
146 if (auto ID = Ptr.getDeclID()) { in CheckTemporary()
147 if (!Ptr.isStaticTemporary()) in CheckTemporary()
150 if (Ptr.getDeclDesc()->getType().isConstQualified()) in CheckTemporary()
158 S.Note(Ptr.getDeclLoc(), diag::note_constexpr_temporary_here); in CheckTemporary()
164 static bool CheckGlobal(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckGlobal() argument
165 if (auto ID = Ptr.getDeclID()) { in CheckGlobal()
166 if (!Ptr.isStatic()) in CheckGlobal()
181 bool CheckExtern(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckExtern() argument
182 if (!Ptr.isExtern()) in CheckExtern()
186 auto *VD = Ptr.getDeclDesc()->asValueDecl(); in CheckExtern()
194 bool CheckArray(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckArray() argument
195 if (!Ptr.isUnknownSizeArray()) in CheckArray()
202 bool CheckLive(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckLive() argument
205 if (Ptr.isZero()) { in CheckLive()
207 if (Ptr.isField()) in CheckLive()
215 if (!Ptr.isLive()) { in CheckLive()
216 bool IsTemp = Ptr.isTemporary(); in CheckLive()
221 S.Note(Ptr.getDeclLoc(), diag::note_constexpr_temporary_here); in CheckLive()
223 S.Note(Ptr.getDeclLoc(), diag::note_declared_at); in CheckLive()
231 bool CheckNull(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckNull() argument
233 if (!Ptr.isZero()) in CheckNull()
240 bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckRange() argument
242 if (!Ptr.isOnePastEnd()) in CheckRange()
249 bool CheckRange(InterpState &S, CodePtr OpPC, const Pointer &Ptr, in CheckRange() argument
251 if (!Ptr.isElementPastEnd()) in CheckRange()
258 bool CheckConst(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckConst() argument
259 assert(Ptr.isLive() && "Pointer is not live"); in CheckConst()
260 if (!Ptr.isConst()) { in CheckConst()
264 const QualType Ty = Ptr.getType(); in CheckConst()
270 bool CheckMutable(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckMutable() argument
271 assert(Ptr.isLive() && "Pointer is not live"); in CheckMutable()
272 if (!Ptr.isMutable()) { in CheckMutable()
277 const FieldDecl *Field = Ptr.getField(); in CheckMutable()
283 bool CheckLoad(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckLoad() argument
284 if (!CheckLive(S, OpPC, Ptr, AK_Read)) in CheckLoad()
286 if (!CheckExtern(S, OpPC, Ptr)) in CheckLoad()
288 if (!CheckRange(S, OpPC, Ptr, AK_Read)) in CheckLoad()
290 if (!CheckInitialized(S, OpPC, Ptr, AK_Read)) in CheckLoad()
292 if (!CheckActive(S, OpPC, Ptr, AK_Read)) in CheckLoad()
294 if (!CheckTemporary(S, OpPC, Ptr, AK_Read)) in CheckLoad()
296 if (!CheckMutable(S, OpPC, Ptr)) in CheckLoad()
301 bool CheckStore(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckStore() argument
302 if (!CheckLive(S, OpPC, Ptr, AK_Assign)) in CheckStore()
304 if (!CheckExtern(S, OpPC, Ptr)) in CheckStore()
306 if (!CheckRange(S, OpPC, Ptr, AK_Assign)) in CheckStore()
308 if (!CheckGlobal(S, OpPC, Ptr)) in CheckStore()
310 if (!CheckConst(S, OpPC, Ptr)) in CheckStore()
315 bool CheckInvoke(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckInvoke() argument
316 if (!CheckLive(S, OpPC, Ptr, AK_MemberCall)) in CheckInvoke()
318 if (!CheckExtern(S, OpPC, Ptr)) in CheckInvoke()
320 if (!CheckRange(S, OpPC, Ptr, AK_MemberCall)) in CheckInvoke()
325 bool CheckInit(InterpState &S, CodePtr OpPC, const Pointer &Ptr) { in CheckInit() argument
326 if (!CheckLive(S, OpPC, Ptr, AK_Assign)) in CheckInit()
328 if (!CheckRange(S, OpPC, Ptr, AK_Assign)) in CheckInit()