Lines Matching refs:Context
66 DeclRefExpr *DRE = new (S.Context) in CreateFunctionRefExpr()
67 DeclRefExpr(S.Context, Fn, false, Fn->getType(), VK_LValue, Loc, LocInfo); in CreateFunctionRefExpr()
72 return S.ImpCastExprToType(DRE, S.Context.getPointerType(DRE->getType()), in CreateFunctionRefExpr()
242 isPointerConversionToVoidPointer(ASTContext& Context) const { in isPointerConversionToVoidPointer()
250 FromType = Context.getArrayDecayedType(FromType); in isPointerConversionToVoidPointer()
590 clang::MakeDeductionFailureInfo(ASTContext &Context, in MakeDeductionFailureInfo() argument
614 auto *Saved = new (Context) DFIDeducedMismatchArgs; in MakeDeductionFailureInfo()
625 DFIArguments *Saved = new (Context) DFIArguments; in MakeDeductionFailureInfo()
637 DFIParamWithArguments *Saved = new (Context) DFIParamWithArguments; in MakeDeductionFailureInfo()
1097 QualType OldQType = Context.getCanonicalType(Old->getType()); in IsOverload()
1098 QualType NewQType = Context.getCanonicalType(New->getType()); in IsOverload()
1138 !Context.hasSameType(Old->getDeclaredReturnType(), in IsOverload()
1207 NewI->getCond()->Profile(NewID, Context, true); in IsOverload()
1208 OldI->getCond()->Profile(OldID, Context, true); in IsOverload()
1293 = S.Context.getCanonicalType(From->getType().getUnqualifiedType()); in TryUserDefinedConversion()
1295 = S.Context.getCanonicalType(ToType).getUnqualifiedType(); in TryUserDefinedConversion()
1389 (S.Context.hasSameUnqualifiedType(FromType, ToType) || in TryImplicitConversion()
1403 if (!S.Context.hasSameUnqualifiedType(FromType, ToType)) in TryImplicitConversion()
1470 if (Context.hasSameUnqualifiedType(FromType, ToType)) in IsFunctionConversion()
1480 CanQualType CanTo = Context.getCanonicalType(ToType); in IsFunctionConversion()
1481 CanQualType CanFrom = Context.getCanonicalType(FromType); in IsFunctionConversion()
1519 FromFn = Context.adjustFunctionType(FromFn, FromEInfo.withNoReturn(false)); in IsFunctionConversion()
1528 Context.getFunctionTypeWithExceptionSpec(QualType(FromFPT, 0), in IsFunctionConversion()
1539 if (Context.mergeExtParameterInfo(ToFPT, FromFPT, CanUseToFPT, in IsFunctionConversion()
1545 QualType QT = Context.getFunctionType(FromFPT->getReturnType(), in IsFunctionConversion()
1575 if (S.Context.hasSameUnqualifiedType(FromType, ToType)) in IsVectorConversion()
1597 if (S.Context.areCompatibleVectorTypes(FromType, ToType) || in IsVectorConversion()
1643 if (FromType == S.Context.OverloadTy) { in IsStandardConversion()
1655 if (!S.Context.hasSameUnqualifiedType( in IsStandardConversion()
1678 = S.Context.getTypeDeclType(Method->getParent()).getTypePtr(); in IsStandardConversion()
1679 FromType = S.Context.getMemberPointerType(FromType, ClassType); in IsStandardConversion()
1684 FromType = S.Context.getPointerType(FromType); in IsStandardConversion()
1690 assert(S.Context.hasSameType( in IsStandardConversion()
1703 S.Context.getCanonicalType(FromType) != S.Context.OverloadTy) { in IsStandardConversion()
1724 FromType = S.Context.getArrayDecayedType(FromType); in IsStandardConversion()
1752 FromType = S.Context.getPointerType(FromType); in IsStandardConversion()
1767 if (S.Context.hasSameUnqualifiedType(FromType, ToType)) { in IsStandardConversion()
1791 FromType = S.Context.BoolTy; in IsStandardConversion()
1793 ToType->isIntegralType(S.Context)) { in IsStandardConversion()
1810 if (&S.Context.getFloatTypeSemantics(FromType) != in IsStandardConversion()
1811 &S.Context.getFloatTypeSemantics(ToType)) { in IsStandardConversion()
1812 bool Float128AndLongDouble = ((FromType == S.Context.Float128Ty && in IsStandardConversion()
1813 ToType == S.Context.LongDoubleTy) || in IsStandardConversion()
1814 (FromType == S.Context.LongDoubleTy && in IsStandardConversion()
1815 ToType == S.Context.Float128Ty)); in IsStandardConversion()
1817 (&S.Context.getFloatTypeSemantics(S.Context.LongDoubleTy) == in IsStandardConversion()
1825 ToType->isIntegralType(S.Context)) || in IsStandardConversion()
1850 S.Context.typesAreCompatible(ToType, FromType)) { in IsStandardConversion()
1901 QualType CanonFrom = S.Context.getCanonicalType(FromType); in IsStandardConversion()
1902 QualType CanonTo = S.Context.getCanonicalType(ToType); in IsStandardConversion()
2003 Context.getTypeSize(FromType) < Context.getTypeSize(ToType))) { in IsIntegralPromotion()
2040 return Context.hasSameUnqualifiedType(Underlying, ToType) || in IsIntegralPromotion()
2047 return Context.hasSameUnqualifiedType( in IsIntegralPromotion()
2073 uint64_t FromSize = Context.getTypeSize(FromType); in IsIntegralPromotion()
2078 Context.IntTy, Context.UnsignedIntTy, in IsIntegralPromotion()
2079 Context.LongTy, Context.UnsignedLongTy , in IsIntegralPromotion()
2080 Context.LongLongTy, Context.UnsignedLongLongTy in IsIntegralPromotion()
2083 uint64_t ToSize = Context.getTypeSize(PromoteTypes[Idx]); in IsIntegralPromotion()
2090 return Context.hasSameUnqualifiedType(ToType, PromoteTypes[Idx]); in IsIntegralPromotion()
2112 if (FromType->isIntegralType(Context) && in IsIntegralPromotion()
2113 MemberDecl->getBitWidth()->isIntegerConstantExpr(BitWidth, Context)) { in IsIntegralPromotion()
2115 ToSize = Context.getTypeSize(ToType); in IsIntegralPromotion()
2204 ASTContext &Context, in BuildSimilarlyQualifiedPointerType() argument
2215 = Context.getCanonicalType(FromPtr->getPointeeType()); in BuildSimilarlyQualifiedPointerType()
2216 QualType CanonToPointee = Context.getCanonicalType(ToPointee); in BuildSimilarlyQualifiedPointerType()
2231 return Context.getObjCObjectPointerType(ToPointee); in BuildSimilarlyQualifiedPointerType()
2232 return Context.getPointerType(ToPointee); in BuildSimilarlyQualifiedPointerType()
2237 = Context.getQualifiedType(CanonToPointee.getLocalUnqualifiedType(), Quals); in BuildSimilarlyQualifiedPointerType()
2240 return Context.getObjCObjectPointerType(QualifiedCanonToPointee); in BuildSimilarlyQualifiedPointerType()
2241 return Context.getPointerType(QualifiedCanonToPointee); in BuildSimilarlyQualifiedPointerType()
2246 ASTContext &Context) { in isNullPointerConstantForConversion() argument
2253 return Expr->isNullPointerConstant(Context, in isNullPointerConstantForConversion()
2285 isNullPointerConstantForConversion(From, InOverloadResolution, Context)) { in IsPointerConversion()
2299 isNullPointerConstantForConversion(From, InOverloadResolution, Context)) { in IsPointerConversion()
2307 isNullPointerConstantForConversion(From, InOverloadResolution, Context)) { in IsPointerConversion()
2317 if (isNullPointerConstantForConversion(From, InOverloadResolution, Context)) { in IsPointerConversion()
2330 ToType, Context); in IsPointerConversion()
2341 if (Context.hasSameUnqualifiedType(FromPointeeType, ToPointeeType)) in IsPointerConversion()
2351 ToType, Context, in IsPointerConversion()
2361 ToType, Context); in IsPointerConversion()
2368 Context.typesAreCompatible(FromPointeeType, ToPointeeType)) { in IsPointerConversion()
2371 ToType, Context); in IsPointerConversion()
2390 !Context.hasSameUnqualifiedType(FromPointeeType, ToPointeeType) && in IsPointerConversion()
2394 ToType, Context); in IsPointerConversion()
2399 Context.areCompatibleVectorTypes(FromPointeeType, ToPointeeType)) { in IsPointerConversion()
2402 ToType, Context); in IsPointerConversion()
2410 static QualType AdoptQualifiers(ASTContext &Context, QualType T, Qualifiers Qs){ in AdoptQualifiers() argument
2418 return Context.getQualifiedType(T, Qs); in AdoptQualifiers()
2420 return Context.getQualifiedType(T.getUnqualifiedType(), Qs); in AdoptQualifiers()
2444 if (Context.hasSameUnqualifiedType(ToObjCPtr->getPointeeType(), in isObjCPointerConversion()
2449 if (Context.canAssignObjCInterfaces(ToObjCPtr, FromObjCPtr)) { in isObjCPointerConversion()
2458 ToType, Context); in isObjCPointerConversion()
2459 ConvertedType = AdoptQualifiers(Context, ConvertedType, FromQualifiers); in isObjCPointerConversion()
2463 if (Context.canAssignObjCInterfaces(FromObjCPtr, ToObjCPtr)) { in isObjCPointerConversion()
2470 ToType, Context); in isObjCPointerConversion()
2471 ConvertedType = AdoptQualifiers(Context, ConvertedType, FromQualifiers); in isObjCPointerConversion()
2484 ConvertedType = AdoptQualifiers(Context, ToType, FromQualifiers); in isObjCPointerConversion()
2493 ConvertedType = AdoptQualifiers(Context, ToType, FromQualifiers); in isObjCPointerConversion()
2515 ConvertedType = Context.getPointerType(ConvertedType); in isObjCPointerConversion()
2516 ConvertedType = AdoptQualifiers(Context, ConvertedType, FromQualifiers); in isObjCPointerConversion()
2526 ConvertedType = Context.getPointerType(ConvertedType); in isObjCPointerConversion()
2527 ConvertedType = AdoptQualifiers(Context, ConvertedType, FromQualifiers); in isObjCPointerConversion()
2542 if (Context.getCanonicalType(FromPointeeType) in isObjCPointerConversion()
2543 == Context.getCanonicalType(ToPointeeType)) in isObjCPointerConversion()
2554 if (Context.getCanonicalType(FromFunctionType->getReturnType()) == in isObjCPointerConversion()
2555 Context.getCanonicalType(ToFunctionType->getReturnType())) { in isObjCPointerConversion()
2572 if (Context.getCanonicalType(FromArgType) in isObjCPointerConversion()
2573 == Context.getCanonicalType(ToArgType)) { in isObjCPointerConversion()
2588 ConvertedType = AdoptQualifiers(Context, ToType, FromQualifiers); in isObjCPointerConversion()
2609 Context.hasSameUnqualifiedType(FromType, ToType)) in isObjCWritebackConversion()
2651 if (Context.typesAreCompatible(FromPointee, ToPointee)) in isObjCWritebackConversion()
2659 FromPointee = Context.getQualifiedType(FromPointee, FromQuals); in isObjCWritebackConversion()
2660 ConvertedType = Context.getPointerType(FromPointee); in isObjCWritebackConversion()
2691 if (Context.hasSameType(FromPointeeType, ToPointeeType)) in IsBlockPointerConversion()
2706 if (Context.hasSameType(FromFunctionType->getReturnType(), in IsBlockPointerConversion()
2716 if (Context.hasSameType(RHS,LHS)) { in IsBlockPointerConversion()
2734 if (Context.hasSameType(FromArgType, ToArgType)) { in IsBlockPointerConversion()
2748 if (!Context.mergeExtParameterInfo(ToFunctionType, FromFunctionType, in IsBlockPointerConversion()
2794 if (!Context.hasSameType(FromMember->getClass(), ToMember->getClass())) { in HandleFunctionTypeMismatch()
2820 if (Context.hasSameType(FromType, ToType)) { in HandleFunctionTypeMismatch()
2850 if (!Context.hasSameType(FromFunction->getReturnType(), in HandleFunctionTypeMismatch()
2888 if (!Context.hasSameType(O->getUnqualifiedType(), in FunctionParamTypesAreEqual()
2915 From->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNotNull) == in CheckPointerConversion()
2917 if (Context.hasSameUnqualifiedType(From->getType(), Context.BoolTy)) in CheckPointerConversion()
2931 !Context.hasSameUnqualifiedType(FromPointeeType, ToPointeeType)) { in CheckPointerConversion()
2979 if (From->isNullPointerConstant(Context, Expr::NPC_ValueDependentIsNull)) in CheckPointerConversion()
2999 if (From->isNullPointerConstant(Context, in IsMemberPointerConversion()
3016 if (!Context.hasSameUnqualifiedType(FromClass, ToClass) && in IsMemberPointerConversion()
3018 ConvertedType = Context.getMemberPointerType(FromTypePtr->getPointeeType(), in IsMemberPointerConversion()
3040 assert(From->isNullPointerConstant(Context, in CheckMemberPointerConversion()
3066 if (Paths.isAmbiguous(Context.getCanonicalType(FromClass). in CheckMemberPointerConversion()
3114 FromType = Context.getCanonicalType(FromType); in IsQualificationConversion()
3115 ToType = Context.getCanonicalType(ToType); in IsQualificationConversion()
3128 while (Context.UnwrapSimilarTypes(FromType, ToType)) { in IsQualificationConversion()
3198 return UnwrappedAnyPointer && Context.hasSameUnqualifiedType(FromType,ToType); in IsQualificationConversion()
3229 static bool isFirstArgumentCompatibleWithType(ASTContext &Context, in isFirstArgumentCompatibleWithType() argument
3236 if (Context.hasSameUnqualifiedType(Type, FirstArg.getNonReferenceType())) in isFirstArgumentCompatibleWithType()
3261 S.Context, Info.Constructor, ToType); in IsInitializerListConstructorConversion()
3339 if (S.Context.hasSameUnqualifiedType(ToType, From->getType()) || in IsUserDefinedConversion()
3388 S.Context, Info.Constructor, ToType); in IsUserDefinedConversion()
3694 compareStandardConversionSubsets(ASTContext &Context, in compareStandardConversionSubsets() argument
3714 } else if (!Context.hasSimilarType(SCS1.getToType(1), SCS2.getToType(1))) in compareStandardConversionSubsets()
3718 return Context.hasSameType(SCS1.getToType(2), SCS2.getToType(2))? Result in compareStandardConversionSubsets()
3780 = compareStandardConversionSubsets(S.Context, SCS1, SCS2)) in CompareStandardConversionSequences()
3811 = SCS1.isPointerConversionToVoidPointer(S.Context); in CompareStandardConversionSequences()
3813 = SCS2.isPointerConversionToVoidPointer(S.Context); in CompareStandardConversionSequences()
3826 !S.Context.hasSameType(SCS1.getFromType(), SCS2.getFromType())) { in CompareStandardConversionSequences()
3836 FromType1 = S.Context.getArrayDecayedType(FromType1); in CompareStandardConversionSequences()
3838 FromType2 = S.Context.getArrayDecayedType(FromType2); in CompareStandardConversionSequences()
3855 bool AssignLeft = S.Context.canAssignObjCInterfaces(FromObjCPtr1, in CompareStandardConversionSequences()
3857 bool AssignRight = S.Context.canAssignObjCInterfaces(FromObjCPtr2, in CompareStandardConversionSequences()
3887 T1 = S.Context.getCanonicalType(T1); in CompareStandardConversionSequences()
3888 T2 = S.Context.getCanonicalType(T2); in CompareStandardConversionSequences()
3890 QualType UnqualT1 = S.Context.getUnqualifiedArrayType(T1, T1Quals); in CompareStandardConversionSequences()
3891 QualType UnqualT2 = S.Context.getUnqualifiedArrayType(T2, T2Quals); in CompareStandardConversionSequences()
3905 T1 = S.Context.getQualifiedType(UnqualT1, T1Quals); in CompareStandardConversionSequences()
3907 T2 = S.Context.getQualifiedType(UnqualT2, T2Quals); in CompareStandardConversionSequences()
3929 S.Context.getTypeSize(SCS1.getFromType()) == in CompareStandardConversionSequences()
3930 S.Context.getTypeSize(SCS1.getToType(2))) in CompareStandardConversionSequences()
3947 bool SCS1IsCompatibleVectorConversion = S.Context.areCompatibleVectorTypes( in CompareStandardConversionSequences()
3949 bool SCS2IsCompatibleVectorConversion = S.Context.areCompatibleVectorTypes( in CompareStandardConversionSequences()
3982 T1 = S.Context.getCanonicalType(T1); in CompareQualificationConversions()
3983 T2 = S.Context.getCanonicalType(T2); in CompareQualificationConversions()
3985 QualType UnqualT1 = S.Context.getUnqualifiedArrayType(T1, T1Quals); in CompareQualificationConversions()
3986 QualType UnqualT2 = S.Context.getUnqualifiedArrayType(T2, T2Quals); in CompareQualificationConversions()
3996 T1 = S.Context.getQualifiedType(UnqualT1, T1Quals); in CompareQualificationConversions()
3998 T2 = S.Context.getQualifiedType(UnqualT2, T2Quals); in CompareQualificationConversions()
4013 while (S.Context.UnwrapSimilarTypes(T1, T2)) { in CompareQualificationConversions()
4048 if (S.Context.hasSameUnqualifiedType(T1, T2)) in CompareQualificationConversions()
4089 FromType1 = S.Context.getArrayDecayedType(FromType1); in CompareDerivedToBaseConversions()
4091 FromType2 = S.Context.getArrayDecayedType(FromType2); in CompareDerivedToBaseConversions()
4094 FromType1 = S.Context.getCanonicalType(FromType1); in CompareDerivedToBaseConversions()
4095 ToType1 = S.Context.getCanonicalType(ToType1); in CompareDerivedToBaseConversions()
4096 FromType2 = S.Context.getCanonicalType(FromType2); in CompareDerivedToBaseConversions()
4097 ToType2 = S.Context.getCanonicalType(ToType2); in CompareDerivedToBaseConversions()
4151 = S.Context.canAssignObjCInterfaces(FromPtr1, FromPtr2); in CompareDerivedToBaseConversions()
4153 = S.Context.canAssignObjCInterfaces(FromPtr2, FromPtr1); in CompareDerivedToBaseConversions()
4155 = S.Context.canAssignObjCInterfaces(ToPtr1, ToPtr2); in CompareDerivedToBaseConversions()
4157 = S.Context.canAssignObjCInterfaces(ToPtr2, ToPtr1); in CompareDerivedToBaseConversions()
4192 if (S.Context.hasSameType(FromType1, FromType2) && in CompareDerivedToBaseConversions()
4213 if (S.Context.hasSameUnqualifiedType(ToType1, ToType2) && in CompareDerivedToBaseConversions()
4261 if (S.Context.hasSameUnqualifiedType(FromType1, FromType2) && in CompareDerivedToBaseConversions()
4262 !S.Context.hasSameUnqualifiedType(ToType1, ToType2)) { in CompareDerivedToBaseConversions()
4273 if (!S.Context.hasSameUnqualifiedType(FromType1, FromType2) && in CompareDerivedToBaseConversions()
4274 S.Context.hasSameUnqualifiedType(ToType1, ToType2)) { in CompareDerivedToBaseConversions()
4311 QualType T1 = Context.getCanonicalType(OrigT1); in CompareReferenceRelationship()
4312 QualType T2 = Context.getCanonicalType(OrigT2); in CompareReferenceRelationship()
4314 QualType UnqualT1 = Context.getUnqualifiedArrayType(T1, T1Quals); in CompareReferenceRelationship()
4315 QualType UnqualT2 = Context.getUnqualifiedArrayType(T2, T2Quals); in CompareReferenceRelationship()
4333 Context.canBindObjCObjectType(UnqualT1, UnqualT2)) in CompareReferenceRelationship()
4353 T1 = Context.getQualifiedType(UnqualT1, T1Quals); in CompareReferenceRelationship()
4355 T2 = Context.getQualifiedType(UnqualT2, T2Quals); in CompareReferenceRelationship()
4534 if (S.Context.getCanonicalType(T2) == S.Context.OverloadTy) { in TryReferenceInit()
4546 Expr::Classification InitCategory = Init->Classify(S.Context); in TryReferenceInit()
4727 isRValRef && Init->Classify(S.Context).isLValue()) in TryReferenceInit()
4824 if (S.Context.hasSameUnqualifiedType(InitType, ToType) || in TryListConversion()
4835 InitializedEntity::InitializeParameter(S.Context, ToType, in TryListConversion()
4865 X = S.Context.getAsArrayType(ToType)->getElementType(); in TryListConversion()
4929 InitializedEntity::InitializeParameter(S.Context, ToType, in TryListConversion()
4966 if (S.Context.getCanonicalType(T2) == S.Context.OverloadTy) { in TryListConversion()
5095 QualType ClassType = S.Context.getTypeDeclType(ActingContext); in TryObjectArgumentInitialization()
5106 QualType ImplicitParamType = S.Context.getQualifiedType(ClassType, Quals); in TryObjectArgumentInitialization()
5142 QualType FromTypeCanon = S.Context.getCanonicalType(FromType); in TryObjectArgumentInitialization()
5153 QualType ClassTypeCanon = S.Context.getCanonicalType(ClassType); in TryObjectArgumentInitialization()
5226 FromClassification = From->Classify(Context); in PerformObjectArgumentInitialization()
5288 if (!Context.hasSameType(From->getType(), DestType)) { in PerformObjectArgumentInitialization()
5303 return TryImplicitConversion(S, From, S.Context.BoolTy, in TryContextuallyConvertToBool()
5320 return PerformImplicitConversion(From, Context.BoolTy, ICS, AA_Converting); in PerformContextuallyConvertToBool()
5322 if (!DiagnoseMultipleUserDefinedConversion(From, Context.BoolTy)) in PerformContextuallyConvertToBool()
5467 switch (SCS->getNarrowingKind(S.Context, Result.get(), PreNarrowingValue, in CheckConvertedConstantExpression()
5481 << PreNarrowingValue.getAsString(S.Context, PreNarrowingType) << T; in CheckConvertedConstantExpression()
5503 if (!Result.get()->EvaluateAsConstantExpr(Eval, Usage, S.Context) || in CheckConvertedConstantExpression()
5513 return ConstantExpr::Create(S.Context, Result.get()); in CheckConvertedConstantExpression()
5564 QualType Ty = S.Context.getObjCIdType(); in TryContextuallyConvertToObjCPointer()
5601 QualType Ty = Context.getObjCIdType(); in PerformContextuallyConvertToObjCPointer()
5668 From = ImplicitCastExpr::Create(SemaRef.Context, Result.get()->getType(), in diagnoseNoViableConversion()
5697 From = ImplicitCastExpr::Create(SemaRef.Context, Result.get()->getType(), in recordConversion()
5948 static bool IsAcceptableNonMemberOperatorCandidate(ASTContext &Context, in IsAcceptableNonMemberOperatorCandidate() argument
5966 if (Context.hasSameUnqualifiedType(T1, ArgType)) in IsAcceptableNonMemberOperatorCandidate()
5975 if (Context.hasSameUnqualifiedType(T2, ArgType)) in IsAcceptableNonMemberOperatorCandidate()
6033 !IsAcceptableNonMemberOperatorCandidate(Context, Function, Args)) in AddOverloadCandidate()
6070 QualType ClassType = Context.getTypeDeclType(Constructor->getParent()); in AddOverloadCandidate()
6072 (Context.hasSameUnqualifiedType(ClassType, Args[0]->getType()) || in AddOverloadCandidate()
6091 QualType C = Context.getRecordType(Constructor->getParent()); in AddOverloadCandidate()
6092 QualType D = Context.getRecordType(Shadow->getParent()); in AddOverloadCandidate()
6094 if ((Context.hasSameUnqualifiedType(P, C) || IsDerivedFrom(Loc, P, C)) && in AddOverloadCandidate()
6095 (Context.hasSameUnqualifiedType(D, P) || IsDerivedFrom(Loc, D, P))) { in AddOverloadCandidate()
6222 if (param->getType() == Context.UnknownAnyTy) { in SelectBestMethod()
6312 S.Context, Function->getParamDecl(I)), in convertArgsForAvailabilityChecks()
6337 S.Context, Function->getParamDecl(i)), in convertArgsForAvailabilityChecks()
6370 Result, Context, Function, llvm::makeArrayRef(ConvertedArgs))) in CheckEnableIf()
6431 Result, Context, cast<FunctionDecl>(DIA->getParent()), Args, ThisArg)) in diagnoseArgDependentDiagnoseIfAttrs()
6443 return DIA->getCond()->EvaluateAsBooleanCondition(Result, Context) && in diagnoseArgIndependentDiagnoseIfAttrs()
6477 ObjectClassification = E->Classify(Context); in AddFunctionCandidates()
6738 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result, in AddMethodTemplateCandidate()
6802 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result, in AddTemplateOverloadCandidate()
6891 if (S.Context.hasSameUnqualifiedType(ConvType, ToNonRefType)) in isAllowableExplicitConversion()
6943 !Context.hasSameUnqualifiedType(Conversion->getConversionType(), ToType)) in AddConversionCandidate()
6985 From->Classify(Context), Conversion, ConversionContext); in AddConversionCandidate()
6997 = Context.getCanonicalType(From->getType().getUnqualifiedType()); in AddConversionCandidate()
6998 QualType ToCanon = Context.getCanonicalType(ToType).getUnqualifiedType(); in AddConversionCandidate()
7014 DeclRefExpr ConversionRef(Context, Conversion, false, Conversion->getType(), in AddConversionCandidate()
7017 Context.getPointerType(Conversion->getType()), in AddConversionCandidate()
7033 QualType CallResultType = ConversionType.getNonLValueExprType(Context); in AddConversionCandidate()
7130 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result, in AddTemplateConversionCandidate()
7175 Object->Classify(Context), Conversion, ActingContext); in AddSurrogateCandidate()
7266 DeclarationName OpName = Context.DeclarationNames.getCXXOperatorName(Op); in AddMemberOperatorCandidates()
7299 Args[0]->Classify(Context), Args.slice(1), in AddMemberOperatorCandidates()
7346 assert(ParamTys[ArgIdx] == Context.BoolTy && in AddBuiltinCandidate()
7409 ASTContext &Context; member in __anon832832a00a11::BuiltinCandidateTypeSet
7424 Context(SemaRef.Context) { } in BuiltinCandidateTypeSet()
7513 QualType QPointeeTy = Context.getCVRQualifiedType(PointeeTy, CVR); in AddPointerWithMoreQualifiedTypeVariants()
7518 QPointerTy = Context.getPointerType(QPointeeTy); in AddPointerWithMoreQualifiedTypeVariants()
7520 QPointerTy = Context.getObjCObjectPointerType(QPointeeTy); in AddPointerWithMoreQualifiedTypeVariants()
7563 QualType QPointeeTy = Context.getCVRQualifiedType(PointeeTy, CVR); in AddMemberPointerWithMoreQualifiedTypeVariants()
7565 Context.getMemberPointerType(QPointeeTy, ClassTy)); in AddMemberPointerWithMoreQualifiedTypeVariants()
7586 Ty = Context.getCanonicalType(Ty); in AddTypesConvertedFrom()
7595 Ty = SemaRef.Context.getArrayDecayedType(Ty); in AddTypesConvertedFrom()
7663 ParamTypes[0] = S.Context.getLValueReferenceType(T); in AddBuiltinAssignmentOperatorCandidates()
7668 if (!S.Context.getCanonicalType(T).isVolatileQualified()) { in AddBuiltinAssignmentOperatorCandidates()
7671 = S.Context.getLValueReferenceType(S.Context.getVolatileType(T)); in AddBuiltinAssignmentOperatorCandidates()
7680 static Qualifiers CollectVRQualifiers(ASTContext &Context, Expr* ArgExpr) { in CollectVRQualifiers() argument
7703 QualType CanTy = Context.getCanonicalType(Conv->getConversionType()); in CollectVRQualifiers()
7761 ArithmeticTypes.push_back(S.Context.FloatTy); in InitArithmeticTypes()
7762 ArithmeticTypes.push_back(S.Context.DoubleTy); in InitArithmeticTypes()
7763 ArithmeticTypes.push_back(S.Context.LongDoubleTy); in InitArithmeticTypes()
7764 if (S.Context.getTargetInfo().hasFloat128Type()) in InitArithmeticTypes()
7765 ArithmeticTypes.push_back(S.Context.Float128Ty); in InitArithmeticTypes()
7770 ArithmeticTypes.push_back(S.Context.IntTy); in InitArithmeticTypes()
7771 ArithmeticTypes.push_back(S.Context.LongTy); in InitArithmeticTypes()
7772 ArithmeticTypes.push_back(S.Context.LongLongTy); in InitArithmeticTypes()
7773 if (S.Context.getTargetInfo().hasInt128Type()) in InitArithmeticTypes()
7774 ArithmeticTypes.push_back(S.Context.Int128Ty); in InitArithmeticTypes()
7775 ArithmeticTypes.push_back(S.Context.UnsignedIntTy); in InitArithmeticTypes()
7776 ArithmeticTypes.push_back(S.Context.UnsignedLongTy); in InitArithmeticTypes()
7777 ArithmeticTypes.push_back(S.Context.UnsignedLongLongTy); in InitArithmeticTypes()
7778 if (S.Context.getTargetInfo().hasInt128Type()) in InitArithmeticTypes()
7779 ArithmeticTypes.push_back(S.Context.UnsignedInt128Ty); in InitArithmeticTypes()
7784 ArithmeticTypes.push_back(S.Context.BoolTy); in InitArithmeticTypes()
7785 ArithmeticTypes.push_back(S.Context.CharTy); in InitArithmeticTypes()
7786 ArithmeticTypes.push_back(S.Context.WCharTy); in InitArithmeticTypes()
7787 if (S.Context.getLangOpts().Char8) in InitArithmeticTypes()
7788 ArithmeticTypes.push_back(S.Context.Char8Ty); in InitArithmeticTypes()
7789 ArithmeticTypes.push_back(S.Context.Char16Ty); in InitArithmeticTypes()
7790 ArithmeticTypes.push_back(S.Context.Char32Ty); in InitArithmeticTypes()
7791 ArithmeticTypes.push_back(S.Context.SignedCharTy); in InitArithmeticTypes()
7792 ArithmeticTypes.push_back(S.Context.ShortTy); in InitArithmeticTypes()
7793 ArithmeticTypes.push_back(S.Context.UnsignedCharTy); in InitArithmeticTypes()
7794 ArithmeticTypes.push_back(S.Context.UnsignedShortTy); in InitArithmeticTypes()
7810 S.Context.getLValueReferenceType(CandidateTy), in addPlusPlusMinusMinusStyleOverloads()
7811 S.Context.IntTy in addPlusPlusMinusMinusStyleOverloads()
7821 S.Context.getLValueReferenceType( in addPlusPlusMinusMinusStyleOverloads()
7822 S.Context.getVolatileType(CandidateTy)); in addPlusPlusMinusMinusStyleOverloads()
7831 = S.Context.getLValueReferenceType( in addPlusPlusMinusMinusStyleOverloads()
7832 S.Context.getCVRQualifiedType(CandidateTy, Qualifiers::Restrict)); in addPlusPlusMinusMinusStyleOverloads()
7837 = S.Context.getLValueReferenceType( in addPlusPlusMinusMinusStyleOverloads()
7838 S.Context.getCVRQualifiedType(CandidateTy, in addPlusPlusMinusMinusStyleOverloads()
7889 if (TypeOfT == S.Context.BoolTy) { in addPlusPlusMinusMinusArithmeticOverloads()
8040 if (!AddedTypes.insert(S.Context.getCanonicalType(*MemPtr)).second) in addEqualEqualOrNotEqualMemberPointerOrNullptrOverloads()
8048 CanQualType NullPtrTy = S.Context.getCanonicalType(S.Context.NullPtrTy); in addEqualEqualOrNotEqualMemberPointerOrNullptrOverloads()
8109 std::make_pair(S.Context.getCanonicalType(FirstParamType), in addGenericBinaryPointerOrEnumeralOverloads()
8110 S.Context.getCanonicalType(SecondParamType))); in addGenericBinaryPointerOrEnumeralOverloads()
8124 if (!AddedTypes.insert(S.Context.getCanonicalType(*Ptr)).second) in addGenericBinaryPointerOrEnumeralOverloads()
8134 CanQualType CanonType = S.Context.getCanonicalType(*Enum); in addGenericBinaryPointerOrEnumeralOverloads()
8171 S.Context.getPointerDiffType(), in addBinaryPlusOrMinusPointerOverloads()
8172 S.Context.getPointerDiffType(), in addBinaryPlusOrMinusPointerOverloads()
8190 if (!AddedTypes.insert(S.Context.getCanonicalType(*Ptr)).second) in addBinaryPlusOrMinusPointerOverloads()
8339 if (!AddedTypes.insert(S.Context.getCanonicalType(*Enum)).second) in addAssignmentMemberPointerOrEnumeralOverloads()
8349 if (!AddedTypes.insert(S.Context.getCanonicalType(*MemPtr)).second) in addAssignmentMemberPointerOrEnumeralOverloads()
8383 AddedTypes.insert(S.Context.getCanonicalType(*Ptr)); in addAssignmentPointerOverloads()
8389 S.Context.getLValueReferenceType(*Ptr), in addAssignmentPointerOverloads()
8390 isEqualOp ? *Ptr : S.Context.getPointerDiffType(), in addAssignmentPointerOverloads()
8400 S.Context.getLValueReferenceType(S.Context.getVolatileType(*Ptr)); in addAssignmentPointerOverloads()
8409 = S.Context.getLValueReferenceType(S.Context.getRestrictType(*Ptr)); in addAssignmentPointerOverloads()
8416 = S.Context.getLValueReferenceType( in addAssignmentPointerOverloads()
8417 S.Context.getCVRQualifiedType(*Ptr, in addAssignmentPointerOverloads()
8432 if (!AddedTypes.insert(S.Context.getCanonicalType(*Ptr)).second) in addAssignmentPointerOverloads()
8436 S.Context.getLValueReferenceType(*Ptr), in addAssignmentPointerOverloads()
8449 S.Context.getLValueReferenceType(S.Context.getVolatileType(*Ptr)); in addAssignmentPointerOverloads()
8458 = S.Context.getLValueReferenceType(S.Context.getRestrictType(*Ptr)); in addAssignmentPointerOverloads()
8465 = S.Context.getLValueReferenceType( in addAssignmentPointerOverloads()
8466 S.Context.getCVRQualifiedType(*Ptr, in addAssignmentPointerOverloads()
8501 S.Context.getLValueReferenceType(ArithmeticTypes[Left]); in addAssignmentArithmeticOverloads()
8508 S.Context.getVolatileType(ArithmeticTypes[Left]); in addAssignmentArithmeticOverloads()
8509 ParamTypes[0] = S.Context.getLValueReferenceType(ParamTypes[0]); in addAssignmentArithmeticOverloads()
8528 ParamTypes[0] = S.Context.getLValueReferenceType(*Vec1); in addAssignmentArithmeticOverloads()
8534 ParamTypes[0] = S.Context.getVolatileType(*Vec1); in addAssignmentArithmeticOverloads()
8535 ParamTypes[0] = S.Context.getLValueReferenceType(ParamTypes[0]); in addAssignmentArithmeticOverloads()
8567 S.Context.getLValueReferenceType(ArithmeticTypes[Left]); in addAssignmentIntegralOverloads()
8572 ParamTypes[0] = S.Context.getVolatileType(ParamTypes[0]); in addAssignmentIntegralOverloads()
8573 ParamTypes[0] = S.Context.getLValueReferenceType(ParamTypes[0]); in addAssignmentIntegralOverloads()
8588 QualType ParamTy = S.Context.BoolTy; in addExclaimOverload()
8594 QualType ParamTypes[2] = { S.Context.BoolTy, S.Context.BoolTy }; in addAmpAmpOrPipePipeOverload()
8615 QualType ParamTypes[2] = { *Ptr, S.Context.getPointerDiffType() }; in addSubscriptOverloads()
8628 QualType ParamTypes[2] = { S.Context.getPointerDiffType(), *Ptr }; in addSubscriptOverloads()
8683 T = Q1.apply(S.Context, T); in addArrowStarOverloads()
8708 if (!AddedTypes.insert(S.Context.getCanonicalType(*Ptr)).second) in addConditionalOperatorOverloads()
8719 if (!AddedTypes.insert(S.Context.getCanonicalType(*MemPtr)).second) in addConditionalOperatorOverloads()
8734 if (!AddedTypes.insert(S.Context.getCanonicalType(*Enum)).second) in addConditionalOperatorOverloads()
8763 VisibleTypeConversionsQuals += CollectVRQualifiers(Context, Args[ArgIdx]); in AddBuiltinOperatorCandidates()
9327 if (Context.hasSameType(VA->getType(), VB->getType())) in isEquivalentInternalLinkageDeclaration()
9339 !Context.hasSameType(EnumA->getIntegerType(), in isEquivalentInternalLinkageDeclaration()
9564 if (!isFunctionAlwaysEnabled(S.Context, FD)) { in checkAddressOfFunctionIsAvailable()
9635 assert(OverloadedExpr->getType() == Context.OverloadTy); in NoteAllOverloadCandidates()
9705 if (FromTy == S.Context.OverloadTy) { in DiagnoseBadConversion()
9722 CanQualType CFromTy = S.Context.getCanonicalType(FromTy); in DiagnoseBadConversion()
9723 CanQualType CToTy = S.Context.getCanonicalType(ToTy); in DiagnoseBadConversion()
10043 QualType NonCanonParam = Qs.apply(S.Context, TParam->getTypeForDecl()); in DiagnoseBadDeduction()
10044 assert(S.Context.hasSameType(Param, NonCanonParam)); in DiagnoseBadDeduction()
10071 if (!T1.isNull() && !T2.isNull() && !S.Context.hasSameType(T1, T2)) { in DiagnoseBadDeduction()
10459 if (isPointer) FnType = S.Context.getPointerType(FnType); in NoteSurrogateCandidate()
10460 if (isRValueReference) FnType = S.Context.getRValueReferenceType(FnType); in NoteSurrogateCandidate()
10461 if (isLValueReference) FnType = S.Context.getLValueReferenceType(FnType); in NoteSurrogateCandidate()
10943 Context.getCanonicalType(Ret).getUnqualifiedType(); in ExtractUnqualifiedFunctionType()
10973 ASTContext& Context; member in __anon832832a01811::AddressOfFunctionResolver
10990 Complain(Complain), Context(S.getASTContext()), in AddressOfFunctionResolver()
11051 return Context.hasSameUnqualifiedType(TargetFunctionType, FD->getType()) || in candidateHasExactlyCorrectType()
11133 MakeDeductionFailureInfo(Context, Result, Info)); in AddMatchingTemplateFunction()
11141 Context.getCanonicalType(Specialization->getType()), in AddMatchingTemplateFunction()
11142 Context.getCanonicalType(TargetFunctionType))); in AddMatchingTemplateFunction()
11382 assert(AddressOfExpr->getType() == Context.OverloadTy); in ResolveAddressOfOverloadedFunction()
11462 assert(E->getType() == Context.OverloadTy && "SrcExpr must be an overload"); in resolveAndFixAddressOfOnlyViableOverloadCandidate()
11542 MakeDeductionFailureInfo(Context, Result, Info)); in ResolveSingleFunctionTemplateSpecialization()
11582 assert(SrcExpr.get()->getType() == Context.OverloadTy); in ResolveAndFixSingleFunctionTemplateSpecialization()
11875 SemaRef.Context.DeclarationNames.getCXXOperatorName(Op); in DiagnoseTwoPhaseOperatorLookup()
12032 CallExpr *CE = CallExpr::Create(Context, Fn, Args, Context.DependentTy, in buildOverloadedCallSet()
12211 DeclarationName OpName = Context.DeclarationNames.getCXXOperatorName(Op); in CreateOverloadedUnaryOp()
12225 llvm::APSInt Zero(Context.getTypeSize(Context.IntTy), false); in CreateOverloadedUnaryOp()
12226 Args[1] = IntegerLiteral::Create(Context, Zero, Context.IntTy, in CreateOverloadedUnaryOp()
12235 return new (Context) UnaryOperator(Input, Opc, Context.DependentTy, in CreateOverloadedUnaryOp()
12240 Context, NamingClass, NestedNameSpecifierLoc(), OpNameInfo, in CreateOverloadedUnaryOp()
12242 return CXXOperatorCallExpr::Create(Context, Op, Fn, ArgsArray, in CreateOverloadedUnaryOp()
12243 Context.DependentTy, VK_RValue, OpLoc, in CreateOverloadedUnaryOp()
12294 Context, in CreateOverloadedUnaryOp()
12313 ResultTy = ResultTy.getNonLValueExprType(Context); in CreateOverloadedUnaryOp()
12317 Context, Op, FnExpr.get(), ArgsArray, ResultTy, VK, OpLoc, in CreateOverloadedUnaryOp()
12405 DeclarationName OpName = Context.DeclarationNames.getCXXOperatorName(Op); in CreateOverloadedBinOp()
12414 return new (Context) BinaryOperator( in CreateOverloadedBinOp()
12415 Args[0], Args[1], Opc, Context.DependentTy, VK_RValue, OK_Ordinary, in CreateOverloadedBinOp()
12418 return new (Context) CompoundAssignOperator( in CreateOverloadedBinOp()
12419 Args[0], Args[1], Opc, Context.DependentTy, VK_LValue, OK_Ordinary, in CreateOverloadedBinOp()
12420 Context.DependentTy, Context.DependentTy, OpLoc, in CreateOverloadedBinOp()
12429 Context, NamingClass, NestedNameSpecifierLoc(), OpNameInfo, in CreateOverloadedBinOp()
12431 return CXXOperatorCallExpr::Create(Context, Op, Fn, Args, in CreateOverloadedBinOp()
12432 Context.DependentTy, VK_RValue, OpLoc, in CreateOverloadedBinOp()
12501 InitializedEntity::InitializeParameter(Context, in CreateOverloadedBinOp()
12517 InitializedEntity::InitializeParameter(Context, in CreateOverloadedBinOp()
12525 InitializedEntity::InitializeParameter(Context, in CreateOverloadedBinOp()
12544 ResultTy = ResultTy.getNonLValueExprType(Context); in CreateOverloadedBinOp()
12547 Context, Op, FnExpr.get(), Args, ResultTy, VK, OpLoc, FPFeatures, in CreateOverloadedBinOp()
12647 << Context.getRecordType(Method->getParent()) in CreateOverloadedBinOp()
12676 Context.DeclarationNames.getCXXOperatorName(OO_Subscript); in CreateOverloadedArraySubscriptExpr()
12687 = UnresolvedLookupExpr::Create(Context, NamingClass, in CreateOverloadedArraySubscriptExpr()
12694 return CXXOperatorCallExpr::Create(Context, OO_Subscript, Fn, Args, in CreateOverloadedArraySubscriptExpr()
12695 Context.DependentTy, VK_RValue, RLoc, in CreateOverloadedArraySubscriptExpr()
12743 Context, in CreateOverloadedArraySubscriptExpr()
12767 ResultTy = ResultTy.getNonLValueExprType(Context); in CreateOverloadedArraySubscriptExpr()
12770 CXXOperatorCallExpr::Create(Context, OO_Subscript, FnExpr.get(), in CreateOverloadedArraySubscriptExpr()
12852 assert(MemExprE->getType() == Context.BoundMemberTy || in BuildCallToMemberFunction()
12853 MemExprE->getType() == Context.OverloadTy); in BuildCallToMemberFunction()
12861 assert(op->getType() == Context.BoundMemberTy); in BuildCallToMemberFunction()
12868 QualType resultType = proto->getCallResultType(Context); in BuildCallToMemberFunction()
12892 CXXMemberCallExpr::Create(Context, MemExprE, Args, resultType, in BuildCallToMemberFunction()
12909 return CallExpr::Create(Context, MemExprE, Args, Context.VoidTy, VK_RValue, in BuildCallToMemberFunction()
12933 : UnresExpr->getBase()->Classify(Context); in BuildCallToMemberFunction()
13040 ResultType = ResultType.getNonLValueExprType(Context); in BuildCallToMemberFunction()
13045 CXXMemberCallExpr::Create(Context, MemExprE, Args, ResultType, VK, in BuildCallToMemberFunction()
13151 DeclarationName OpName = Context.DeclarationNames.getCXXOperatorName(OO_Call); in BuildCallToObjectOfClassType()
13164 Object.get()->Classify(Context), Args, CandidateSet, in BuildCallToObjectOfClassType()
13280 Call = ImplicitCastExpr::Create(Context, Call.get()->getType(), in BuildCallToObjectOfClassType()
13304 Context.DeclarationNames.getCXXOperatorName(OO_Call), LParenLoc); in BuildCallToObjectOfClassType()
13344 Context, in BuildCallToObjectOfClassType()
13383 ResultTy = ResultTy.getNonLValueExprType(Context); in BuildCallToObjectOfClassType()
13386 CXXOperatorCallExpr::Create(Context, OO_Call, NewFn.get(), MethodArgs, in BuildCallToObjectOfClassType()
13419 Context.DeclarationNames.getCXXOperatorName(OO_Arrow); in BuildOverloadedArrowExpr()
13433 AddMethodCandidate(Oper.getPair(), Base->getType(), Base->Classify(Context), in BuildOverloadedArrowExpr()
13502 ResultTy = ResultTy.getNonLValueExprType(Context); in BuildOverloadedArrowExpr()
13504 Context, OO_Arrow, FnExpr.get(), Base, ResultTy, VK, OpLoc, FPOptions()); in BuildOverloadedArrowExpr()
13565 InitializedEntity::InitializeParameter(Context, FD->getParamDecl(ArgIdx)), in BuildLiteralOperatorCall()
13574 ResultTy = ResultTy.getNonLValueExprType(Context); in BuildLiteralOperatorCall()
13577 Context, Fn.get(), llvm::makeArrayRef(ConvArgs, Args.size()), ResultTy, in BuildLiteralOperatorCall()
13626 UnresolvedLookupExpr::Create(Context, /*NamingClass=*/nullptr, in BuildForRangeBeginEndCall()
13671 return new (Context) ParenExpr(PE->getLParen(), PE->getRParen(), SubExpr); in FixOverloadedFunctionReference()
13677 assert(Context.hasSameType(ICE->getSubExpr()->getType(), in FixOverloadedFunctionReference()
13684 return ImplicitCastExpr::Create(Context, ICE->getType(), in FixOverloadedFunctionReference()
13704 return new (Context) GenericSelectionExpr( in FixOverloadedFunctionReference()
13705 Context, GSE->getGenericLoc(), GSE->getControllingExpr(), in FixOverloadedFunctionReference()
13740 = Context.getTypeDeclType(cast<RecordDecl>(Method->getDeclContext())); in FixOverloadedFunctionReference()
13742 = Context.getMemberPointerType(Fn->getType(), ClassType.getTypePtr()); in FixOverloadedFunctionReference()
13744 if (Context.getTargetInfo().getCXXABI().isMicrosoft()) in FixOverloadedFunctionReference()
13747 return new (Context) UnaryOperator(SubExpr, UO_AddrOf, MemPtrType, in FixOverloadedFunctionReference()
13757 return new (Context) UnaryOperator(SubExpr, UO_AddrOf, in FixOverloadedFunctionReference()
13758 Context.getPointerType(SubExpr->getType()), in FixOverloadedFunctionReference()
13778 DeclRefExpr *DRE = DeclRefExpr::Create(Context, in FixOverloadedFunctionReference()
13807 DeclRefExpr *DRE = DeclRefExpr::Create(Context, in FixOverloadedFunctionReference()
13825 Base = new (Context) CXXThisExpr(Loc, in FixOverloadedFunctionReference()
13839 type = Context.BoundMemberTy; in FixOverloadedFunctionReference()
13843 Context, Base, MemExpr->isArrow(), MemExpr->getOperatorLoc(), in FixOverloadedFunctionReference()