Lines Matching defs:To

112 bool isStandardPointerConvertible(QualType From, QualType To) {
114 (To->isPointerType() || To->isMemberPointerType()) &&
117 if (!moreOrEquallyQualified(To->getPointeeType(), From->getPointeeType()))
126 if (To->isPointerType() && From->isNullPtrType())
132 if (To->isVoidPointerType() && From->isObjectPointerType())
143 To->getPointeeType().getTypePtr())) {
147 To->getPointeeType().getTypePtr());
154 bool isFunctionPointerConvertible(QualType From, QualType To) {
159 if (!To->isFunctionPointerType() && !To->isMemberFunctionPointerType())
162 if (To->isFunctionPointerType()) {
164 return To->getPointeeType() == From->getPointeeType();
167 return To->getPointeeType() == From;
172 if (To->isMemberFunctionPointerType()) {
177 const auto *ToMember = cast<MemberPointerType>(To);
188 // Checks if From is qualification convertible to To based on the current
194 bool isQualificationConvertiblePointer(QualType From, QualType To,
237 // Two types From and To are similar if they have cv-decompositions with the
243 // A prvalue expression of type From can be converted to type To if the
245 // - From and To are similar
247 // To, and similarly for volatile.
249 // unknown bound of”, P_i of To is “array of unknown bound of”.]
250 // - If the cv_i of From and cv_i of To are different, then const is in every
251 // cv_k of To for 0 < k < i.
256 const QualType &To) {
258 if (From.getQualifiers() != To.getQualifiers() && !ConstUntilI)
263 if (From.isConstQualified() && !To.isConstQualified())
266 if (From.isVolatileQualified() && !To.isVolatileQualified())
269 ConstUntilI = To.isConstQualified();
275 while (isValidP_i(From) && isValidP_i(To)) {
278 To = To.getCanonicalType();
280 if (!SatisfiesCVRules(From, To))
283 if (!isSameP_i(From, To)) {
285 if (From->isConstantArrayType() && !To->isIncompleteArrayType())
288 if (From->isIncompleteArrayType() && !To->isIncompleteArrayType())
300 getPointeeOrArrayElementQualType(To);
304 assert(ToPointeeOrElem && "To pointer or array has no pointee or element!");
307 To = *ToPointeeOrElem;
310 // In this case the length (n) of From and To are not the same.
311 if (isValidP_i(From) || isValidP_i(To))
315 if (!SatisfiesCVRules(From, To))
318 return From.getTypePtr() == To.getTypePtr();