Lines Matching refs:Ptr
81 /// Ptr - There are 3 forms that 'Ptr' represents:
82 /// 1) A single NamedDecl. (Ptr & 0x1 == 0)
84 /// same declaration context. (Ptr & 0x3 == 0x1)
86 /// declaration contexts too. (Ptr & 0x3 == 0x3)
87 uintptr_t Ptr;
90 /// A single NamedDecl. (Ptr & 0x1 == 0)
92 Ptr = reinterpret_cast<uintptr_t>(D);
93 assert((Ptr & 0x1) == 0 && "Invalid Ptr!");
98 Ptr = reinterpret_cast<uintptr_t>(I) | 0x1;
101 bool isIterator() const { return (Ptr & 0x1); }
104 assert(isIterator() && "Ptr not an iterator!");
105 return reinterpret_cast<BaseIter>(Ptr & ~0x3);
112 iterator() : Ptr(0) {}
118 return reinterpret_cast<NamedDecl*>(Ptr);
122 return Ptr == RHS.Ptr;
125 return Ptr != RHS.Ptr;
131 Ptr = 0;
137 uintptr_t getAsOpaqueValue() const { return Ptr; }
141 Result.Ptr = P;
204 static inline bool isDeclPtr(void *Ptr) {
205 return (reinterpret_cast<uintptr_t>(Ptr) & 0x1) == 0;
209 static inline IdDeclInfo *toIdDeclInfo(void *Ptr) {
210 assert((reinterpret_cast<uintptr_t>(Ptr) & 0x1) == 1
211 && "Ptr not a IdDeclInfo* !");
213 reinterpret_cast<uintptr_t>(Ptr) & ~0x1