Home | History | Annotate | Download | only in Sema

Lines Matching refs:Sema

10 // This file provides Sema routines for C++ overloading.
14 #include "clang/Sema/Overload.h"
25 #include "clang/Sema/Initialization.h"
26 #include "clang/Sema/Lookup.h"
27 #include "clang/Sema/SemaInternal.h"
28 #include "clang/Sema/Template.h"
29 #include "clang/Sema/TemplateDeduction.h"
37 using namespace sema;
41 CreateFunctionRefExpr(Sema &S, FunctionDecl *Fn, NamedDecl *FoundDecl,
60 static bool IsStandardConversion(Sema &S, Expr* From, QualType ToType,
66 static bool IsTransparentUnionStandardConversion(Sema &S, Expr* From,
72 IsUserDefinedConversion(Sema &S, Expr *From, QualType ToType,
79 CompareStandardConversionSequences(Sema &S,
84 CompareQualificationConversions(Sema &S,
89 CompareDerivedToBaseConversions(Sema &S,
555 /// \brief Convert from Sema's representation of template deduction information
559 Sema::TemplateDeductionResult TDK,
566 case Sema::TDK_Success:
567 case Sema::TDK_Invalid:
568 case Sema::TDK_InstantiationDepth:
569 case Sema::TDK_TooManyArguments:
570 case Sema::TDK_TooFewArguments:
573 case Sema::TDK_Incomplete:
574 case Sema::TDK_InvalidExplicitArguments:
578 case Sema::TDK_NonDeducedMismatch: {
587 case Sema::TDK_Inconsistent:
588 case Sema::TDK_Underqualified: {
598 case Sema::TDK_SubstitutionFailure:
608 case Sema::TDK_FailedOverloadResolution:
612 case Sema::TDK_MiscellaneousDeductionFailure:
620 switch (static_cast<Sema::TemplateDeductionResult>(Result)) {
621 case Sema::TDK_Success:
622 case Sema::TDK_Invalid:
623 case Sema::TDK_InstantiationDepth:
624 case Sema::TDK_Incomplete:
625 case Sema::TDK_TooManyArguments:
626 case Sema::TDK_TooFewArguments:
627 case Sema::TDK_InvalidExplicitArguments:
628 case Sema::TDK_FailedOverloadResolution:
631 case Sema::TDK_Inconsistent:
632 case Sema::TDK_Underqualified:
633 case Sema::TDK_NonDeducedMismatch:
638 case Sema::TDK_SubstitutionFailure:
648 case Sema::TDK_MiscellaneousDeductionFailure:
662 switch (static_cast<Sema::TemplateDeductionResult>(Result)) {
663 case Sema::TDK_Success:
664 case Sema::TDK_Invalid:
665 case Sema::TDK_InstantiationDepth:
666 case Sema::TDK_TooManyArguments:
667 case Sema::TDK_TooFewArguments:
668 case Sema::TDK_SubstitutionFailure:
669 case Sema::TDK_NonDeducedMismatch:
670 case Sema::TDK_FailedOverloadResolution:
673 case Sema::TDK_Incomplete:
674 case Sema::TDK_InvalidExplicitArguments:
677 case Sema::TDK_Inconsistent:
678 case Sema::TDK_Underqualified:
682 case Sema::TDK_MiscellaneousDeductionFailure:
691 switch (static_cast<Sema::TemplateDeductionResult>(Result)) {
692 case Sema::TDK_Success:
693 case Sema::TDK_Invalid:
694 case Sema::TDK_InstantiationDepth:
695 case Sema::TDK_TooManyArguments:
696 case Sema::TDK_TooFewArguments:
697 case Sema::TDK_Incomplete:
698 case Sema::TDK_InvalidExplicitArguments:
699 case Sema::TDK_Inconsistent:
700 case Sema::TDK_Underqualified:
701 case Sema::TDK_NonDeducedMismatch:
702 case Sema::TDK_FailedOverloadResolution:
705 case Sema::TDK_SubstitutionFailure:
709 case Sema::TDK_MiscellaneousDeductionFailure:
717 switch (static_cast<Sema::TemplateDeductionResult>(Result)) {
718 case Sema::TDK_Success:
719 case Sema::TDK_Invalid:
720 case Sema::TDK_InstantiationDepth:
721 case Sema::TDK_Incomplete:
722 case Sema::TDK_TooManyArguments:
723 case Sema::TDK_TooFewArguments:
724 case Sema::TDK_InvalidExplicitArguments:
725 case Sema::TDK_SubstitutionFailure:
726 case Sema::TDK_FailedOverloadResolution:
729 case Sema::TDK_Inconsistent:
730 case Sema::TDK_Underqualified:
731 case Sema::TDK_NonDeducedMismatch:
735 case Sema::TDK_MiscellaneousDeductionFailure:
744 switch (static_cast<Sema::TemplateDeductionResult>(Result)) {
745 case Sema::TDK_Success:
746 case Sema::TDK_Invalid:
747 case Sema::TDK_InstantiationDepth:
748 case Sema::TDK_Incomplete:
749 case Sema::TDK_TooManyArguments:
750 case Sema::TDK_TooFewArguments:
751 case Sema::TDK_InvalidExplicitArguments:
752 case Sema::TDK_SubstitutionFailure:
753 case Sema::TDK_FailedOverloadResolution:
756 case Sema::TDK_Inconsistent:
757 case Sema::TDK_Underqualified:
758 case Sema::TDK_NonDeducedMismatch:
762 case Sema::TDK_MiscellaneousDeductionFailure:
771 if (static_cast<Sema::TemplateDeductionResult>(Result) ==
772 Sema::TDK_FailedOverloadResolution)
803 void save(Sema &S, Expr *&E) {
825 static bool checkPlaceholderForOverload(Sema &S, Expr *&E,
855 static bool checkArgPlaceholdersForOverload(Sema &S, Expr **args,
899 Sema::OverloadKind
900 Sema::CheckOverload(Scope *S, FunctionDecl *New, const LookupResult &Old,
980 static bool shouldTryToOverload(Sema &S, FunctionDecl *New, FunctionDecl *Old,
1080 bool Sema::IsOverload(FunctionDecl *New, FunctionDecl *Old,
1098 bool Sema::isFunctionConsideredUnavailable(FunctionDecl *FD) {
1107 TryUserDefinedConversion(Sema &S, Expr *From, QualType ToType,
1210 TryImplicitConversion(Sema &S, Expr *From, QualType ToType,
1263 Sema::TryImplicitConversion(Expr *From, QualType ToType,
1281 Sema::PerformImplicitConversion(Expr *From, QualType ToType,
1288 Sema::PerformImplicitConversion(Expr *From, QualType ToType,
1310 bool Sema::IsNoReturnConversion(QualType FromType, QualType ToType,
1402 static bool tryAtomicConversion(Sema &S, Expr *From, QualType ToType,
1415 static bool IsStandardConversion(Sema &S, Expr* From, QualType ToType,
1694 IsTransparentUnionStandardConversion(Sema &S, Expr* From,
1722 bool Sema
1869 bool Sema::IsFloatingPointPromotion(QualType FromType, QualType ToType) {
1902 bool Sema::IsComplexPromotion(QualType FromType, QualType ToType) {
1996 bool Sema::IsPointerConversion(Expr *From, QualType FromType, QualType ToType,
2149 bool Sema::isObjCPointerConversion(QualType FromType, QualType ToType,
2345 bool Sema::isObjCWritebackConversion(QualType FromType, QualType ToType,
2403 bool Sema::IsBlockPointerConversion(QualType FromType, QualType ToType,
2505 void Sema::HandleFunctionTypeMismatch(PartialDiagnostic &PDiag,
2597 bool Sema::FunctionArgTypesAreEqual(const FunctionProtoType *OldType,
2648 bool Sema::CheckPointerConversion(Expr *From, QualType ToType,
2719 bool Sema::IsMemberPointerConversion(Expr *From, QualType FromType,
2762 bool Sema::CheckMemberPointerConversion(Expr *From, QualType ToType,
2829 Sema::IsQualificationConversion(QualType FromType, QualType ToType,
2909 static bool tryAtomicConversion(Sema &S, Expr *From, QualType ToType,
2946 IsInitializerListConstructorConversion(Sema &S, Expr *From, QualType ToType,
3028 IsUserDefinedConversion(Sema &S, Expr *From, QualType ToType,
3243 Sema::DiagnoseMultipleUserDefinedConversion(Expr *From, QualType ToType) {
3267 compareConversionFunctions(Sema &S,
3302 CompareImplicitConversionSequences(Sema &S,
3460 CompareStandardConversionSequences(Sema &S,
3634 CompareQualificationConversions(Sema &S,
3747 CompareDerivedToBaseConversions(Sema &S,
3947 Sema::ReferenceCompareResult
3948 Sema::CompareReferenceRelationship(SourceLocation Loc,
4022 FindConversionForRefInit(Sema &S, ImplicitConversionSequence &ICS,
4075 Sema::Ref_Incompatible)
4149 TryReferenceInit(Sema &S, Expr *Init, QualType DeclType,
4178 Sema::ReferenceCompareResult RefRelationship
4194 RefRelationship >= Sema::Ref_Compatible_With_Added_Qualification) {
4237 RefRelationship == Sema::Ref_Incompatible) {
4265 if (RefRelationship >= Sema::Ref_Compatible_With_Added_Qualification &&
4307 if (!SuppressUserConversions && RefRelationship == Sema::Ref_Incompatible &&
4330 if (RefRelationship == Sema::Ref_Related) {
4353 if (SuppressUserConversions && RefRelationship == Sema::Ref_Incompatible &&
4359 if (RefRelationship >= Sema::Ref_Related &&
4413 TryCopyInitialization(Sema &S, Expr *From, QualType ToType,
4422 TryListConversion(Sema &S, InitListExpr *From, QualType ToType,
4555 Sema::ReferenceCompareResult RefRelationship
4559 if (RefRelationship >= Sema::Ref_Related)
4629 TryCopyInitialization(Sema &S, Expr *From, QualType ToType,
4654 Sema &S,
4668 TryObjectArgumentInitialization(Sema &S, QualType FromType,
4781 Sema::PerformObjectArgumentInitialization(Expr *From,
4843 TryContextuallyConvertToBool(Sema &S, Expr *From) {
4856 ExprResult Sema::PerformContextuallyConvertToBool(Expr *From) {
4874 static bool CheckConvertedConstantConversions(Sema &S,
4927 ExprResult Sema::CheckConvertedConstantExpression(Expr *From, QualType T,
5056 TryContextuallyConvertToObjCPointer(Sema &S, Expr *From) {
5089 ExprResult Sema::PerformContextuallyConvertToObjCPointer(Expr *From) {
5128 Sema::ConvertToIntegralOrEnumerationType(SourceLocation Loc, Expr *From,
5166 virtual void diagnose(Sema &S, SourceLocation Loc, QualType T) {
5301 Sema::AddOverloadCandidate(FunctionDecl *Function,
5336 EnterExpressionEvaluationContext Unevaluated(*this, Sema::Unevaluated);
5425 void Sema::AddFunctionCandidates(const UnresolvedSetImpl &Fns,
5462 void Sema::AddMethodCandidate(DeclAccessPair FoundDecl,
5498 Sema::AddMethodCandidate(CXXMethodDecl *Method, DeclAccessPair FoundDecl,
5514 EnterExpressionEvaluationContext Unevaluated(*this, Sema::Unevaluated);
5599 Sema::AddMethodTemplateCandidate(FunctionTemplateDecl *MethodTmpl,
5652 Sema::AddTemplateOverloadCandidate(FunctionTemplateDecl *FunctionTemplate,
5702 Sema::AddConversionCandidate(CXXConversionDecl *Conversion,
5714 EnterExpressionEvaluationContext Unevaluated(*this, Sema::Unevaluated);
5843 Sema::AddTemplateConversionCandidate(FunctionTemplateDecl *FunctionTemplate,
5884 void Sema::AddSurrogateCandidate(CXXConversionDecl *Conversion,
5895 EnterExpressionEvaluationContext Unevaluated(*this, Sema::Unevaluated);
5990 void Sema::AddMemberOperatorCandidates(OverloadedOperatorKind Op,
6039 void Sema::AddBuiltinCandidate(QualType ResultTy, QualType *ParamTys,
6045 EnterExpressionEvaluationContext Unevaluated(*this, Sema::Unevaluated);
6130 /// Sema - The semantic analysis instance where we are building the
6132 Sema &SemaRef;
6145 BuiltinCandidateTypeSet(Sema &SemaRef)
6385 static void AddBuiltinAssignmentOperatorCandidates(Sema &S,
6473 Sema &S;
6645 Sema &S, Expr **Args, unsigned NumArgs,
7551 Sema::AddBuiltinOperatorCandidates(OverloadedOperatorKind Op,
7740 Sema::AddArgumentDependentLookupCandidates(DeclarationName Name,
7788 isBetterOverloadCandidate(Sema &S,
7912 OverloadCandidateSet::BestViableFunction(Sema &S, SourceLocation Loc,
7966 OverloadCandidateKind ClassifyOverloadCandidate(Sema &S,
8014 void MaybeEmitInheritedConstructorNote(Sema &S, FunctionDecl *Fn) {
8027 void Sema::NoteOverloadCandidate(FunctionDecl *Fn, QualType DestType) {
8039 void Sema::NoteAllOverloadCandidates(Expr* OverloadedExpr, QualType DestType) {
8062 Sema &S,
8085 void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, unsigned I) {
8300 void DiagnoseArityMismatch(Sema &S, OverloadCandidate *Cand,
8323 Cand->DeductionFailure.Result == Sema::TDK_TooFewArguments));
8333 Cand->DeductionFailure.Result == Sema::TDK_TooManyArguments));
8356 void DiagnoseBadDeduction(Sema &S, OverloadCandidate *Cand,
8366 case Sema::TDK_Success:
8369 case Sema::TDK_Incomplete: {
8377 case Sema::TDK_Underqualified: {
8402 case Sema::TDK_Inconsistent: {
8421 case Sema::TDK_InvalidExplicitArguments:
8443 case Sema::TDK_TooManyArguments:
8444 case Sema::TDK_TooFewArguments:
8448 case Sema::TDK_InstantiationDepth:
8453 case Sema::TDK_SubstitutionFailure: {
8491 case Sema::TDK_FailedOverloadResolution: {
8500 case Sema::TDK_NonDeducedMismatch:
8509 case Sema::TDK_MiscellaneousDeductionFailure:
8517 void DiagnoseBadTarget(Sema &S, OverloadCandidate *Cand) {
8521 Sema::CUDAFunctionTarget CallerTarget = S.IdentifyCUDATarget(Caller),
8544 void NoteFunctionCandidate(Sema &S, OverloadCandidate *Cand,
8597 void NoteSurrogateCandidate(Sema &S, OverloadCandidate *Cand) {
8630 void NoteBuiltinOperatorCandidate(Sema &S,
8650 void NoteAmbiguousUserConversions(Sema &S, SourceLocation OpLoc,
8673 switch ((Sema::TemplateDeductionResult)DFI.Result) {
8674 case Sema::TDK_Success:
8677 case Sema::TDK_Invalid:
8678 case Sema::TDK_Incomplete:
8681 case Sema::TDK_Underqualified:
8682 case Sema::TDK_Inconsistent:
8685 case Sema::TDK_SubstitutionFailure:
8686 case Sema::TDK_NonDeducedMismatch:
8687 case Sema::TDK_MiscellaneousDeductionFailure:
8690 case Sema::TDK_InstantiationDepth:
8691 case Sema::TDK_FailedOverloadResolution:
8694 case Sema::TDK_InvalidExplicitArguments:
8697 case Sema::TDK_TooManyArguments:
8698 case Sema::TDK_TooFewArguments:
8705 Sema &S;
8706 CompareOverloadCandidatesForDisplay(Sema &S) : S(S) {}
8811 void CompleteNonViableCandidate(Sema &S, OverloadCandidate *Cand,
8898 void OverloadCandidateSet::NoteCandidates(Sema &S,
8971 QualType Sema::ExtractUnqualifiedFunctionType(QualType PossiblyAFunctionType) {
8991 Sema& S;
9009 AddressOfFunctionResolver(Sema &S, Expr* SourceExpr,
9097 if (Sema::TemplateDeductionResult Result
9295 Sema::ResolveAddressOfOverloadedFunction(Expr *AddressOfExpr,
9335 Sema::ResolveSingleFunctionTemplateSpecialization(OverloadExpr *ovl,
9412 bool Sema::ResolveAndFixSingleFunctionTemplateSpecialization(
9488 static void AddOverloadedCallCandidate(Sema &S,
9521 void Sema::AddOverloadedCallCandidates(UnresolvedLookupExpr *ULE,
9583 DiagnoseTwoPhaseLookup(Sema &SemaRef, SourceLocation FnLoc,
9622 Sema::AssociatedNamespaceSet AssociatedNamespaces;
9623 Sema::AssociatedClassSet AssociatedClasses;
9627 Sema::AssociatedNamespaceSet SuggestedNamespaces;
9629 for (Sema::AssociatedNamespaceSet::iterator
9681 DiagnoseTwoPhaseOperatorLookup(Sema &SemaRef, OverloadedOperatorKind Op,
9686 LookupResult R(SemaRef, OpName, OpLoc, Sema::LookupOperatorName);
9697 RecoveryCallCCC(Sema &SemaRef, unsigned NumArgs, bool HasExplicitTemplateArgs)
9754 Sema &SemaRef;
9756 BuildRecoveryCallExprRAII(Sema &S) : SemaRef(S) {
9772 BuildRecoveryCallExpr(Sema &SemaRef, Scope *S, Expr *Fn,
9800 Sema::LookupOrdinaryName);
9841 bool Sema::buildOverloadedCallSet(Scope *S, Expr *Fn,
9904 static ExprResult FinishOverloadedCallExpr(Sema &SemaRef, Scope *S, Expr *Fn,
9984 ExprResult Sema::BuildOverloadedCallExpr(Scope *S, Expr *Fn,
10030 Sema::CreateOverloadedUnaryOp(SourceLocation OpLoc, unsigned OpcIn,
10228 Sema::CreateOverloadedBinOp(SourceLocation OpLoc,
10495 Sema::CreateOverloadedArraySubscriptExpr(SourceLocation LLoc,
10672 Sema::BuildCallToMemberFunction(Scope *S, Expr *MemExprE,
10912 Sema::BuildCallToObjectOfClassType(Scope *S, Expr *Obj,
11209 Sema::BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc) {
11311 ExprResult Sema::BuildLiteralOperatorCall(LookupResult &R,
11389 Sema::ForRangeStatus
11390 Sema::BuildForRangeBeginEndCall(Scope *S, SourceLocation Loc,
11461 Expr *Sema::FixOverloadedFunctionReference(Expr *E, DeclAccessPair Found,
11622 ExprResult Sema::FixOverloadedFunctionReference(ExprResult E,