• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/llvm-project/clang/lib/AST/Interp/

Lines Matching refs:Ptr

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