Lines Matching defs:T2

3371 static bool hasSimilarType(ASTContext &Context, QualType T1, QualType T2) {
3372 while (Context.UnwrapSimilarPointerTypes(T1, T2)) {
3375 T2 = Context.getUnqualifiedArrayType(T2, Quals);
3378 return Context.hasSameUnqualifiedType(T1, T2);
3575 QualType T2 = SCS2.getToType(2);
3577 T2 = S.Context.getCanonicalType(T2);
3580 QualType UnqualT2 = S.Context.getUnqualifiedArrayType(T2, T2Quals);
3595 if (isa<ArrayType>(T2) && T2Quals)
3596 T2 = S.Context.getQualifiedType(UnqualT2, T2Quals);
3597 if (T2.isMoreQualifiedThan(T1))
3599 else if (T1.isMoreQualifiedThan(T2))
3635 // yield similar types T1 and T2 (C++ 4.4), respectively, and the
3637 // the cv-qualification signature of type T2, and S1 is not the
3646 QualType T2 = SCS2.getToType(2);
3648 T2 = S.Context.getCanonicalType(T2);
3651 QualType UnqualT2 = S.Context.getUnqualifiedArrayType(T2, T2Quals);
3662 if (isa<ArrayType>(T2) && T2Quals)
3663 T2 = S.Context.getQualifiedType(UnqualT2, T2Quals);
3678 while (S.Context.UnwrapSimilarPointerTypes(T1, T2)) {
3687 if (T1.getCVRQualifiers() == T2.getCVRQualifiers())
3691 else if (T2.isMoreQualifiedThan(T1)) {
3699 } else if (T1.isMoreQualifiedThan(T2)) {
3700 // T2 has fewer qualifiers, so it could be the better sequence.
3713 if (S.Context.hasSameUnqualifiedType(T1, T2))
3945 /// CompareReferenceRelationship - Compare the two types T1 and T2 to
3960 assert(!OrigT2->isReferenceType() && "T2 cannot be a reference type");
3963 QualType T2 = Context.getCanonicalType(OrigT2);
3966 QualType UnqualT2 = Context.getUnqualifiedArrayType(T2, T2Quals);
3969 // Given types "cv1 T1" and "cv2 T2," "cv1 T1" is
3970 // reference-related to "cv2 T2" if T1 is the same type as T2, or
3971 // T1 is a base class of T2.
3988 // At this point, we know that T1 and T2 are reference-related (at
3995 if (isa<ArrayType>(T2) && T2Quals)
3996 T2 = Context.getQualifiedType(UnqualT2, T2Quals);
3999 // "cv1 T1" is reference-compatible with "cv2 T2" if T1 is
4000 // reference-related to T2 and cv1 is the same cv-qualification
4032 Expr *Init, QualType T2, bool AllowRvalues,
4034 assert(T2->isRecordType() && "Can only find conversions of record types.");
4036 = dyn_cast<CXXRecordDecl>(T2->getAs<RecordType>()->getDecl());
4170 QualType T2 = Init->getType();
4173 // to resolve the overloaded function. If all goes well, T2 is the
4175 if (S.Context.getCanonicalType(T2) == S.Context.OverloadTy) {
4179 T2 = Fn->getType();
4189 = S.CompareReferenceRelationship(DeclLoc, T1, T2, DerivedToBase,
4195 // of type "cv2 T2" as follows:
4200 // reference-compatible with "cv2 T2," or
4218 ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
4219 ICS.Standard.setToType(0, T2);
4225 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4238 // -- has a class type (i.e., T2 is a class type), where T1 is
4239 // not reference-related to T2, and can be implicitly
4245 if (!SuppressUserConversions && T2->isRecordType() &&
4246 !S.RequireCompleteType(DeclLoc, T2, 0) &&
4249 Init, T2, /*AllowRvalues=*/false,
4274 // lvalue and "cv1 T1" is reference-compatible with "cv2 T2", or
4277 (InitCategory.isPRValue() && (T2->isRecordType() || T2->isArrayType())) ||
4278 (InitCategory.isLValue() && T2->isFunctionType()))) {
4285 ICS.Standard.FromTypePtr = T2.getAsOpaquePtr();
4286 ICS.Standard.setToType(0, T2);
4297 (InitCategory.isPRValue() && !T2->isRecordType());
4299 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4307 // -- has a class type (i.e., T2 is a class type), where T1 is not
4308 // reference-related to T2, and can be implicitly converted to
4318 T2->isRecordType() && !S.RequireCompleteType(DeclLoc, T2, 0) &&
4320 Init, T2, /*AllowRvalues=*/true,
4337 // reference-related to T2, cv1 must be the same
4349 Qualifiers T2Quals = T2.getQualifiers();
4364 (T1->isRecordType() || T2->isRecordType()))
4367 // If T1 is reference-related to T2 and the reference is an rvalue
4394 ICS.Standard.BindsToFunctionLvalue = T2->isFunctionType();
4414 ICS.UserDefined.After.BindsToFunctionLvalue = T2->isFunctionType();
4547 QualType T2 = Init->getType();
4550 // to resolve the overloaded function. If all goes well, T2 is the
4552 if (S.Context.getCanonicalType(T2) == S.Context.OverloadTy) {
4556 T2 = Fn->getType();
4564 = S.CompareReferenceRelationship(From->getLocStart(), T1, T2, dummy1,
6222 // a right operand of a type whose cv-unqualified version is T2,