Home | History | Annotate | Download | only in Sema

Lines Matching refs:Sema

32 #include "clang/Sema/CXXFieldCollector.h"
33 #include "clang/Sema/DeclSpec.h"
34 #include "clang/Sema/Initialization.h"
35 #include "clang/Sema/Lookup.h"
36 #include "clang/Sema/ParsedTemplate.h"
37 #include "clang/Sema/Scope.h"
38 #include "clang/Sema/ScopeInfo.h"
39 #include "clang/Sema/SemaInternal.h"
40 #include "clang/Sema/Template.h"
62 Sema &S;
66 CheckDefaultArgumentVisitor(Sema &S, const Expr *DefaultArg)
160 Sema::ImplicitExceptionSpecification::CalledDecl(SourceLocation CallLoc,
228 void Sema::ImplicitExceptionSpecification::CalledStmt(Stmt *S) {
257 ExprResult Sema::ConvertParamDefaultArgument(ParmVarDecl *Param, Expr *Arg,
285 void Sema::SetParamDefaultArgument(ParmVarDecl *Param, Expr *Arg,
307 Sema::ActOnParamDefaultArgument(Decl *param, SourceLocation EqualLoc,
362 void Sema::ActOnParamUnparsedDefaultArgument(Decl *param,
375 void Sema::ActOnParamDefaultArgumentError(Decl *param,
394 void Sema::CheckExtraCXXDefaultArguments(Declarator &D) {
449 bool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old,
712 Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D,
907 Sema &S, ArrayRef<BindingDecl *> Bindings, ValueDecl *Src,
933 static bool checkArrayLikeDecomposition(Sema &S,
948 static bool checkArrayDecomposition(Sema &S, ArrayRef<BindingDecl*> Bindings,
956 static bool checkVectorDecomposition(Sema &S, ArrayRef<BindingDecl*> Bindings,
965 static bool checkComplexDecomposition(Sema &S,
997 static bool lookupStdTypeTraitMember(Sema &S, LookupResult &TraitMemberLookup,
1019 Loc, Sema::LookupOrdinaryName);
1056 getTrivialIntegralTemplateArgument(Sema &S, SourceLocation Loc, QualType T,
1063 getTrivialTypeTemplateArgument(Sema &S, SourceLocation Loc, QualType T) {
1069 static IsTupleLike isTupleLike(Sema &S, SourceLocation Loc, QualType T,
1072 S, Sema::ExpressionEvaluationContext::ConstantEvaluated);
1075 LookupResult R(S, Value, Loc, Sema::LookupOrdinaryName);
1090 struct ICEDiagnoser : Sema::VerifyICEDiagnoser {
1095 Sema::SemaDiagnosticBuilder diagnoseNotICE(Sema &S,
1116 static QualType getTupleLikeElementType(Sema &S, SourceLocation Loc,
1125 LookupResult R(S, TypeDN, Loc, Sema::LookupOrdinaryName);
1147 Sema &S;
1148 InitializingBinding(Sema &S, BindingDecl *BD) : S(S) {
1149 Sema::CodeSynthesisContext Ctx;
1150 Ctx.Kind = Sema::CodeSynthesisContext::InitializingStructuredBinding;
1161 static bool checkTupleLikeDecomposition(Sema &S,
1181 LookupResult MemberGet(S, GetDN, Src->getLocation(), Sema::LookupMemberName);
1300 static DeclAccessPair findDecomposableBaseClass(Sema &S, SourceLocation Loc,
1371 static bool checkMemberDecomposition(Sema &S, ArrayRef<BindingDecl*> Bindings,
1472 void Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) {
1546 void Sema::MergeVarDeclExceptionSpecs(VarDecl *New, VarDecl *Old) {
1586 void Sema::CheckCXXDefaultArguments(FunctionDecl *FD) {
1633 static bool CheckLiteralType(Sema &SemaRef, Sema::CheckConstexprKind Kind,
1640 case Sema::CheckConstexprKind::Diagnose:
1644 case Sema::CheckConstexprKind::CheckValid:
1652 static bool CheckConstexprDestructorSubobjects(Sema &SemaRef,
1654 Sema::CheckConstexprKind Kind) {
1661 if (Kind == Sema::CheckConstexprKind::Diagnose) {
1683 static bool CheckConstexprParameterTypes(Sema &SemaRef,
1685 Sema::CheckConstexprKind Kind) {
1704 static bool CheckConstexprReturnType(Sema &SemaRef, const FunctionDecl *FD,
1705 Sema::CheckConstexprKind Kind) {
1727 static bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl,
1729 Sema::CheckConstexprKind Kind);
1737 bool Sema::CheckConstexprFunctionDefinition(const FunctionDecl *NewFD,
1824 static bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl,
1826 Sema::CheckConstexprKind Kind) {
1850 if (Kind == Sema::CheckConstexprKind::Diagnose) {
1865 if (Kind == Sema::CheckConstexprKind::Diagnose) {
1893 if (Kind == Sema::CheckConstexprKind::Diagnose) {
1907 if (Kind == Sema::CheckConstexprKind::Diagnose) {
1920 if (Kind == Sema::CheckConstexprKind::Diagnose) {
1941 if (Kind == Sema::CheckConstexprKind::Diagnose) {
1965 static bool CheckConstexprCtorInitializer(Sema &SemaRef,
1970 Sema::CheckConstexprKind Kind) {
1972 if (Kind == Sema::CheckConstexprKind::CheckValid &&
1992 if (Kind == Sema::CheckConstexprKind::Diagnose) {
2021 CheckConstexprFunctionStmt(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *S,
2024 Sema::CheckConstexprKind Kind) {
2154 if (Kind == Sema::CheckConstexprKind::Diagnose) {
2166 static bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl,
2168 Sema::CheckConstexprKind Kind) {
2185 case Sema::CheckConstexprKind::CheckValid:
2190 case Sema::CheckConstexprKind::Diagnose:
2213 if (Kind == Sema::CheckConstexprKind::CheckValid) {
2245 if (Kind == Sema::CheckConstexprKind::Diagnose) {
2304 case Sema::CheckConstexprKind::Diagnose:
2313 case Sema::CheckConstexprKind::CheckValid:
2323 case Sema::CheckConstexprKind::Diagnose:
2334 case Sema::CheckConstexprKind::CheckValid:
2356 if (Kind == Sema::CheckConstexprKind::Diagnose &&
2378 CXXRecordDecl *Sema::getCurrentClass(Scope *, const CXXScopeSpec *SS) {
2396 bool Sema::isCurrentClassName(const IdentifierInfo &II, Scope *S,
2405 bool Sema::isCurrentClassNameTypo(IdentifierInfo *&II, const CXXScopeSpec *SS) {
2465 Sema::CheckBaseSpecifier(CXXRecordDecl *Class,
2617 Sema::ActOnBaseSpecifier(Decl *classdecl, SourceRange SpecifierRange,
2689 bool Sema::AttachBaseSpecifiers(CXXRecordDecl *Class,
2795 void Sema::ActOnBaseSpecifiers(Decl *ClassDecl,
2806 bool Sema::IsDerivedFrom(SourceLocation Loc, QualType Derived, QualType Base) {
2833 bool Sema::IsDerivedFrom(SourceLocation Loc, QualType Derived, QualType Base,
2871 void Sema::BuildBasePathArray(const CXXBasePaths &Paths,
2890 Sema::CheckDerivedToBaseConversion(QualType Derived, QualType Base,
2972 Sema::CheckDerivedToBaseConversion(QualType Derived, QualType Base,
2995 std::string Sema::getAmbiguousPathsDisplayString(CXXBasePaths &Paths) {
3019 bool Sema::ActOnAccessSpecifier(AccessSpecifier Access, SourceLocation ASLoc,
3030 void Sema::CheckOverrideControl(NamedDecl *D) {
3098 void Sema::DiagnoseAbsenceOfOverrideControl(NamedDecl *D, bool Inconsistent) {
3136 bool Sema::CheckIfOverriddenFunctionIsMarkedFinal(const CXXMethodDecl *New,
3170 void Sema::CheckShadowInheritedFields(const SourceLocation &Loc,
3226 Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D,
3534 Sema &S;
3555 UninitializedFieldVisitor(Sema &S,
3872 Sema &SemaRef, const CXXConstructorDecl *Constructor) {
3939 void Sema::ActOnStartCXXInClassMemberInitializer() {
3945 void Sema::ActOnStartTrailingRequiresClause(Scope *S, Declarator &D) {
3959 ExprResult Sema::ActOnFinishTrailingRequiresClause(ExprResult ConstraintExpr) {
3963 ExprResult Sema::ActOnRequiresClause(ExprResult ConstraintExpr) {
3981 void Sema::ActOnFinishCXXInClassMemberInitializer(Decl *D,
4039 static bool FindBaseInitializer(Sema &SemaRef,
4082 Sema::ActOnMemInitializer(Decl *ConstructorD,
4098 Sema::ActOnMemInitializer(Decl *ConstructorD,
4142 ValueDecl *Sema::tryLookupCtorInitMemberDecl(CXXRecordDecl *ClassDecl,
4156 Sema::BuildMemInitializer(Decl *ConstructorD,
4328 Sema::BuildMemberInitializer(ValueDecl *Member, Expr *Init,
4404 Sema::BuildDelegatingInitializer(TypeSourceInfo *TInfo, Expr *Init,
4461 Sema::BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo,
4593 static Expr *CastForMoving(Sema &SemaRef, Expr *E, QualType T = QualType()) {
4616 BuildImplicitBaseInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor,
4699 BuildImplicitMemberInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor,
4731 Sema::LookupMemberName);
4859 Sema &S;
4867 BaseAndFieldInfo(Sema &S, CXXConstructorDecl *Ctor, bool ErrorsInInits)
4963 static bool CollectFieldInitializer(Sema &SemaRef, BaseAndFieldInfo &Info,
5032 Sema::SetDelegatingInitializer(CXXConstructorDecl *Constructor,
5053 bool Sema::SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors,
5253 static void AddInitializerToDiag(const Sema::SemaDiagnosticBuilder &Diag,
5268 Sema &SemaRef, const CXXConstructorDecl *Constructor,
5359 Sema::SemaDiagnosticBuilder D = SemaRef.Diag(
5398 bool CheckRedundantInit(Sema &S,
5428 bool CheckRedundantUnionInit(Sema &S,
5464 void Sema::ActOnMemInitializers(Decl *ConstructorDecl,
5531 Sema::MarkBaseAndMemberDestructorsReferenced(SourceLocation Location,
5631 void Sema::MarkVirtualBaseDestructorsReferenced(
5669 void Sema::ActOnDefaultCtorInitializers(Decl *CDtorDecl) {
5680 bool Sema::isAbstractType(SourceLocation Loc, QualType T) {
5701 bool Sema::RequireNonAbstractType(SourceLocation Loc, QualType T,
5712 void Sema::DiagnoseAbstractType(const CXXRecordDecl *RD) {
5766 Sema &S;
5771 AbstractUsageInfo(Sema &S, CXXRecordDecl *Record)
5783 void CheckType(const NamedDecl *D, TypeLoc TL, Sema::AbstractDiagSelID Sel);
5793 void Visit(TypeLoc TL, Sema::AbstractDiagSelID Sel) {
5802 void Check(FunctionProtoTypeLoc TL, Sema::AbstractDiagSelID Sel) {
5803 Visit(TL.getReturnLoc(), Sema::AbstractReturnType);
5809 if (TSI) Visit(TSI->getTypeLoc(), Sema::AbstractParamType);
5813 void Check(ArrayTypeLoc TL, Sema::AbstractDiagSelID Sel) {
5814 Visit(TL.getElementLoc(), Sema::AbstractArrayType);
5817 void Check(TemplateSpecializationTypeLoc TL, Sema::AbstractDiagSelID Sel) {
5823 Visit(TSI->getTypeLoc(), Sema::AbstractNone);
5830 void Check(Type TL, Sema::AbstractDiagSelID Sel) { \
5831 Visit(TL.getNextTypeLoc(), Sema::AbstractNone); \
5841 void Check(TypeLoc TL, Sema::AbstractDiagSelID Sel) {
5850 if (Sel == Sema::AbstractNone) return;
5855 Sel = Sema::AbstractArrayType;
5862 if (Sel == Sema::AbstractArrayType) {
5874 Sema::AbstractDiagSelID Sel) {
5892 Info.CheckType(MD, TSI->getTypeLoc(), Sema::AbstractNone);
5912 Info.CheckType(FD, TSI->getTypeLoc(), Sema::AbstractFieldType);
5916 Info.CheckType(VD, TSI->getTypeLoc(), Sema::AbstractVariableType);
5928 static void ReferenceDllExportedMembers(Sema &S, CXXRecordDecl *Class) {
5944 Sema &S;
5945 MarkingClassDllexported(Sema &S, CXXRecordDecl *Class,
5948 Sema::CodeSynthesisContext Ctx;
5949 Ctx.Kind = Sema::CodeSynthesisContext::MarkingClassDllexported;
6013 static void checkForMultipleExportedDefaultConstructors(Sema &S,
6051 static void checkCUDADeviceBuiltinSurfaceClassTemplate(Sema &S,
6054 auto reportIllegalClassTemplate = [&ErrorReported](Sema &S,
6105 static void checkCUDADeviceBuiltinTextureClassTemplate(Sema &S,
6108 auto reportIllegalClassTemplate = [&ErrorReported](Sema &S,
6168 void Sema::checkClassLevelCodeSegAttribute(CXXRecordDecl *Class) {
6179 void Sema::checkClassLevelDLLAttribute(CXXRecordDecl *Class) {
6343 void Sema::propagateDLLAttrToBaseClassTemplate(
6408 Sema::DefaultedFunctionKind
6409 Sema::getDefaultedFunctionKind(const FunctionDecl *FD) {
6413 return Sema::CXXDefaultConstructor;
6416 return Sema::CXXCopyConstructor;
6419 return Sema::CXXMoveConstructor;
6423 return Sema::CXXCopyAssignment;
6426 return Sema::CXXMoveAssignment;
6429 return Sema::CXXDestructor;
6462 static void DefineDefaultedFunction(Sema
6464 Sema::DefaultedFunctionKind DFK = S.getDefaultedFunctionKind(FD);
6469 case Sema::CXXDefaultConstructor:
6473 case Sema::CXXCopyConstructor:
6476 case Sema::CXXCopyAssignment:
6479 case Sema::CXXDestructor:
6482 case Sema::CXXMoveConstructor:
6485 case Sema::CXXMoveAssignment:
6488 case Sema::CXXInvalid:
6495 static bool canPassInRegisters(Sema &S, CXXRecordDecl *D,
6613 ReportOverrides(Sema &S, unsigned DiagID, const CXXMethodDecl *MD,
6635 void Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) {
6966 static Sema::SpecialMemberOverloadResult lookupCallFromSpecialMember(
6967 Sema &S, CXXRecordDecl *Class, Sema::CXXSpecialMember CSM,
6970 if (CSM == Sema::CXXCopyAssignment || CSM == Sema::CXXMoveAssignment)
6974 if (CSM == Sema::CXXDefaultConstructor || CSM == Sema::CXXDestructor)
6987 class Sema::InheritedConstructorInfo {
6988 Sema &S;
6998 InheritedConstructorInfo(Sema &S, SourceLocation UseLoc,
7071 specialMemberIsConstexpr(Sema &S, CXXRecordDecl *ClassDecl,
7072 Sema::CXXSpecialMember CSM, unsigned Quals,
7075 Sema::InheritedConstructorInfo *Inherited = nullptr) {
7079 assert(CSM == Sema::CXXDefaultConstructor);
7086 if (CSM == Sema::CXXDefaultConstructor)
7088 if (CSM == Sema::CXXDestructor)
7091 Sema::SpecialMemberOverloadResult SMOR =
7103 Sema &S, CXXRecordDecl *ClassDecl, Sema::CXXSpecialMember CSM,
7105 Sema::InheritedConstructorInfo *Inherited = nullptr) {
7113 case Sema::CXXDefaultConstructor:
7124 case Sema::CXXCopyConstructor:
7125 case Sema::CXXMoveConstructor:
7129 case Sema::CXXCopyAssignment:
7130 case Sema::CXXMoveAssignment:
7137 case Sema::CXXDestructor:
7140 case Sema::CXXInvalid:
7152 return CSM == Sema::CXXDefaultConstructor
7190 if (CSM == Sema::CXXDefaultConstructor && F->hasInClassInitializer())
7199 } else if (CSM == Sema::CXXDefaultConstructor) {
7212 Sema &S;
7214 ComputingExceptionSpec(Sema &S, FunctionDecl *FD, SourceLocation Loc)
7216 Sema::CodeSynthesisContext Ctx;
7217 Ctx.Kind = Sema::CodeSynthesisContext::ExceptionSpecEvaluation;
7228 static Sema::ImplicitExceptionSpecification
7230 Sema &S, SourceLocation Loc, CXXMethodDecl *MD, Sema::CXXSpecialMember CSM,
7231 Sema::InheritedConstructorInfo *ICI);
7233 static Sema::ImplicitExceptionSpecification
7234 ComputeDefaultedComparisonExceptionSpec(Sema &S, SourceLocation Loc,
7236 Sema::DefaultedComparisonKind DCK);
7238 static Sema::ImplicitExceptionSpecification
7239 computeImplicitExceptionSpec(Sema &S, SourceLocation Loc, FunctionDecl *FD) {
7252 Sema::InheritedConstructorInfo ICI(
7255 S, Loc, CD, Sema::CXXDefaultConstructor, &ICI);
7258 static FunctionProtoType::ExtProtoInfo getImplicitMethodEPI(Sema &S,
7273 void Sema::EvaluateImplicitExceptionSpec(SourceLocation Loc, FunctionDecl *FD) {
7286 void Sema::CheckExplicitlyDefaultedFunction(Scope *S, FunctionDecl *FD) {
7302 bool Sema::CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD,
7523 using DefaultedComparisonKind = Sema::DefaultedComparisonKind;
7525 DefaultedComparisonVisitor(Sema &S, CXXRecordDecl *RD, FunctionDecl *FD,
7619 Sema &S;
7675 DefaultedComparisonAnalyzer(Sema &S, CXXRecordDecl *RD, FunctionDecl *FD,
7981 DefaultedComparisonSynthesizer(Sema &S, CXXRecordDecl *RD, FunctionDecl *FD,
7988 Sema::CompoundScopeRAII CompoundScope(S);
8055 Sema::ComparisonCategoryUsage::DefaultedOperator);
8155 Sema::ConditionKind::Boolean),
8229 Sema::ConditionKind::Boolean),
8294 Sema::ConditionResult Cond = S.ActOnCondition(
8295 nullptr, Loc, Comp.get(), Sema::ConditionKind::Boolean);
8339 static void lookupOperatorsForDefaultedComparison(Sema &Self, Scope *S,
8363 bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD,
8574 void Sema::DeclareImplicitEqualityComparison(CXXRecordDecl *RD,
8576 Sema::CodeSynthesisContext Ctx;
8577 Ctx.Kind = Sema::CodeSynthesisContext::DeclaringImplicitEqualityComparison;
8588 void Sema::DefineDefaultedComparison(SourceLocation UseLoc, FunctionDecl *FD,
8623 static Sema::ImplicitExceptionSpecification
8624 ComputeDefaultedComparisonExceptionSpec(Sema &S, SourceLocation Loc,
8626 Sema::DefaultedComparisonKind DCK) {
8628 Sema::ImplicitExceptionSpecification ExceptSpec(S);
8646 Sema::SynthesizedFunctionScope Scope(S, FD);
8648 S, Sema::ExpressionEvaluationContext::Unevaluated);
8667 void Sema::CheckDelayedMemberExceptionSpecs() {
8690 Sema &S;
8692 Sema::CXXSpecialMember CSM;
8693 Sema::InheritedConstructorInfo *ICI;
8698 SpecialMemberVisitor(Sema &S, CXXMethodDecl *MD, Sema::CXXSpecialMember CSM,
8699 Sema::InheritedConstructorInfo *ICI)
8702 case Sema::CXXDefaultConstructor:
8703 case Sema::CXXCopyConstructor:
8704 case Sema::CXXMoveConstructor:
8707 case Sema::CXXCopyAssignment:
8708 case Sema::CXXMoveAssignment:
8711 case Sema::CXXDestructor:
8713 case Sema::CXXInvalid:
8728 return CSM == Sema::CXXMoveConstructor || CSM == Sema::CXXMoveAssignment;
8732 Sema::SpecialMemberOverloadResult lookupIn(CXXRecordDecl *Class,
8740 Sema::SpecialMemberOverloadResult lookupInheritedCtor(CXXRecordDecl *Class) {
8743 assert(CSM == Sema::CXXDefaultConstructor);
8812 SpecialMemberDeletionInfo(Sema &S, CXXMethodDecl *MD,
8813 Sema::CXXSpecialMember CSM,
8814 Sema::InheritedConstructorInfo *ICI, bool Diagnose)
8820 Sema::CXXSpecialMember getEffectiveCSM() {
8821 return ICI ? Sema::CXXInvalid : CSM;
8836 Sema::SpecialMemberOverloadResult SMOR,
8867 Subobject Subobj, Sema::SpecialMemberOverloadResult SMOR,
8874 if (SMOR.getKind() == Sema::SpecialMemberOverloadResult::NoMemberOrDeleted)
8876 else if (SMOR.getKind() == Sema::SpecialMemberOverloadResult::Ambiguous)
8937 if (!(CSM == Sema::CXXDefaultConstructor &&
8947 Sema::SpecialMemberOverloadResult SMOR =
8948 S.LookupSpecialMember(Class, Sema::CXXDestructor,
8967 if (CSM == Sema::CXXDefaultConstructor && FD->hasInClassInitializer())
8991 Sema::SpecialMemberOverloadResult SMOR = lookupInheritedCtor(BaseClass);
9019 if (CSM == Sema::CXXDefaultConstructor) {
9043 } else if (CSM == Sema::CXXCopyConstructor) {
9094 if (CSM == Sema::CXXDefaultConstructor && AllVariantFieldsAreConst &&
9122 if (CSM == Sema::CXXDefaultConstructor && inUnion() && AllFieldsAreConst) {
9141 bool Sema::ShouldDeleteSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM,
9272 void Sema::DiagnoseDeletedDefaultedFunction(FunctionDecl *FD) {
9299 static bool findTrivialSpecialMember(Sema &S, CXXRecordDecl *RD,
9300 Sema::CXXSpecialMember CSM, unsigned Quals,
9302 Sema::TrivialABIHandling TAH,
9308 case Sema::CXXInvalid:
9311 case Sema::CXXDefaultConstructor:
9340 case Sema::CXXDestructor:
9345 (TAH == Sema::TAH_ConsiderTrivialABI &&
9357 case Sema::CXXCopyConstructor:
9362 (TAH == Sema::TAH_ConsiderTrivialABI &&
9378 case Sema::CXXCopyAssignment:
9393 case Sema::CXXMoveConstructor:
9394 case Sema::CXXMoveAssignment:
9396 Sema::SpecialMemberOverloadResult SMOR =
9403 if (SMOR.getKind() == Sema::SpecialMemberOverloadResult::Ambiguous)
9408 Sema::SpecialMemberOverloadResult::NoMemberOrDeleted);
9417 if (TAH == Sema::TAH_ConsiderTrivialABI &&
9418 (CSM == Sema::CXXCopyConstructor || CSM == Sema::CXXMoveConstructor))
9454 static bool checkTrivialSubobjectCall(Sema &S, SourceLocation SubobjLoc,
9456 Sema::CXXSpecialMember CSM,
9458 Sema::TrivialABIHandling TAH, bool Diagnose) {
9472 if (!Selected && CSM == Sema::CXXDefaultConstructor) {
9495 S.SpecialMemberIsTrivial(Selected, CSM, Sema::TAH_IgnoreTrivialABI,
9505 static bool checkTrivialClassMembers(Sema &S, CXXRecordDecl *RD,
9506 Sema::CXXSpecialMember CSM,
9508 Sema::TrivialABIHandling TAH,
9528 if (CSM == Sema::CXXDefaultConstructor && FI->hasInClassInitializer()) {
9557 void Sema::DiagnoseNontrivial(const CXXRecordDecl *RD, CXXSpecialMember CSM) {
9569 bool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM,
9708 Sema *S;
9786 void Sema::FindHiddenVirtualMethods(CXXMethodDecl *MD,
9814 void Sema::NoteHiddenVirtualMethods(CXXMethodDecl *MD,
9827 void Sema::DiagnoseHiddenVirtualMethods(CXXMethodDecl *MD) {
9844 void Sema::checkIllFormedTrivialABIStruct(CXXRecordDecl &RD) {
9918 void Sema::ActOnFinishCXXMemberSpecification(
9984 void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) {
10082 Sema::ActOnReenterTemplateScope(Decl *D,
10148 void Sema::ActOnStartDelayedMemberDeclarations(Scope *S, Decl *RecordD) {
10155 void Sema::ActOnFinishDelayedMemberDeclarations(Scope *S, Decl *RecordD) {
10163 void Sema::ActOnReenterCXXMethodParameter(Scope *S, ParmVarDecl *Param) {
10180 void Sema::ActOnStartDelayedCXXMethodDeclaration(Scope *S, Decl *MethodD) {
10188 void Sema::ActOnDelayedCXXMethodParameter(Scope *S, Decl *ParamD) {
10205 void Sema::ActOnFinishDelayedCXXMethodDeclaration(Scope *S, Decl *MethodD) {
10227 static void checkMethodTypeQualifiers(Sema &S, Declarator &D, unsigned DiagID) {
10252 QualType Sema::CheckConstructorDeclarator(Declarator &D, QualType R,
10315 void Sema::CheckConstructor(CXXConstructorDecl *Constructor) {
10350 bool Sema::CheckDestructor(CXXDestructorDecl *Destructor) {
10405 QualType Sema::CheckDestructorDeclarator(Declarator &D, QualType R,
10527 void Sema::CheckConversionDeclarator(Declarator &D, QualType &R,
10693 Decl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) {
10739 BadSpecifierDiagnoser(Sema &S, SourceLocation Loc, unsigned DiagID)
10759 Sema &S;
10760 Sema::SemaDiagnosticBuilder Diagnostic;
10769 void Sema::CheckDeductionGuideDeclarator(Declarator &D, QualType &R,
10887 static void DiagnoseNamespaceInlineMismatch(Sema &S, SourceLocation KeywordLoc,
10907 Decl *Sema::ActOnStartNamespaceDef(
11060 void Sema::ActOnFinishNamespaceDef(Decl *Dcl, SourceLocation RBrace) {
11072 CXXRecordDecl *Sema::getStdBadAlloc() const {
11077 EnumDecl *Sema::getStdAlignValT() const {
11081 NamespaceDecl *Sema::getStdNamespace() const {
11086 NamespaceDecl *Sema::lookupStdExperimentalNamespace() {
11110 Sema &S;
11133 QualType Sema::CheckComparisonCategoryType(ComparisonCategoryType Kind,
11239 NamespaceDecl *Sema::getOrCreateStdNamespace() {
11254 bool Sema::isStdInitializerList(QualType Ty, QualType *Element) {
11314 static ClassTemplateDecl *LookupStdInitializerList(Sema &S, SourceLocation Loc){
11322 Loc, Sema::LookupOrdinaryName);
11348 QualType Sema::BuildStdInitializerList(QualType Element, SourceLocation Loc) {
11363 bool Sema::isInitListConstructor(const FunctionDecl *Ctor) {
11410 static bool TryNamespaceTypoCorrection(Sema &S, LookupResult &R, Scope *Sc,
11418 Sema::CTK_ErrorRecovery)) {
11438 Decl *Sema::ActOnUsingDirective(Scope *S, SourceLocation UsingLoc,
11521 void Sema::PushUsingDirective(Scope *S, UsingDirectiveDecl *UDir) {
11534 Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS,
11636 bool Sema::CheckUsingShadowDecl(UsingDecl *Using, NamedDecl *Orig,
11804 UsingShadowDecl *Sema::BuildUsingShadowDecl(Scope *S,
11874 void Sema
12000 NamedDecl *Sema::BuildUsingDeclaration(
12257 NamedDecl *Sema::BuildUsingPackDecl(NamedDecl *InstantiatedFrom,
12271 bool Sema::CheckInheritingConstructorUsingDecl(UsingDecl *UD) {
12301 bool Sema::CheckUsingDeclRedeclaration(SourceLocation UsingLoc,
12379 bool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc,
12567 Decl *Sema::ActOnAliasDeclaration(Scope *S, AccessSpecifier AS,
12723 Decl *Sema::ActOnNamespaceAliasDef(Scope *S, SourceLocation NamespaceLoc,
12804 Sema::ImplicitExceptionSpecification ExceptSpec;
12806 SpecialMemberExceptionSpecInfo(Sema &S, CXXMethodDecl *MD,
12807 Sema::CXXSpecialMember CSM,
12808 Sema::InheritedConstructorInfo *ICI,
12819 Sema::SpecialMemberOverloadResult SMOR);
12829 Sema::SpecialMemberOverloadResult SMOR = lookupInheritedCtor(BaseClass);
12840 if (CSM == Sema::CXXDefaultConstructor && FD->hasInClassInitializer()) {
12868 Subobject Subobj, Sema::SpecialMemberOverloadResult SMOR) {
12875 bool Sema::tryResolveExplicitSpecifier(ExplicitSpecifier &ExplicitSpec) {
12890 ExplicitSpecifier Sema::ActOnExplicitBoolSpecifier(Expr *ExplicitExpr) {
12897 static Sema::ImplicitExceptionSpecification
12899 Sema &S, SourceLocation Loc, CXXMethodDecl *MD, Sema::CXXSpecialMember CSM,
12900 Sema::InheritedConstructorInfo *ICI) {
12944 Sema &S;
12945 Sema::SpecialMemberDecl D;
12946 Sema::ContextRAII SavedContext;
12949 DeclaringSpecialMember(Sema &S, CXXRecordDecl *RD, Sema::CXXSpecialMember CSM)
12959 Sema::CodeSynthesisContext Ctx;
12960 Ctx.Kind = Sema::CodeSynthesisContext::DeclaringSpecialMember;
12987 void Sema::CheckImplicitSpecialMemberDeclaration(Scope *S, FunctionDecl *FD) {
13002 void Sema::setupImplicitSpecialMemberType(CXXMethodDecl *SpecialMem,
13017 CXXConstructorDecl *Sema::DeclareImplicitDefaultConstructor(
13081 void Sema::DefineImplicitDefaultConstructor(SourceLocation CurrentLocation,
13122 void Sema::ActOnFinishDelayedMemberInitializers(Decl *D) {
13130 Sema::findInheritingConstructor(SourceLocation Loc,
13212 void Sema::NoteDeletedInheritingConstructor(CXXConstructorDecl *Ctor) {
13219 void Sema::DefineInheritingConstructor(SourceLocation CurrentLocation,
13300 CXXDestructorDecl *Sema::DeclareImplicitDestructor(CXXRecordDecl *ClassDecl) {
13367 void Sema::DefineImplicitDestructor(SourceLocation CurrentLocation,
13409 void Sema::CheckCompleteDestructorVariant(SourceLocation CurrentLocation,
13430 void Sema::ActOnFinishCXXMemberDecls() {
13442 void Sema::ActOnFinishCXXNonNestedClass() {
13461 void Sema::referenceDLLExportedClassMethods() {
13472 void Sema::AdjustDestructorExceptionSpec(CXXDestructorDecl *Destructor) {
13520 virtual Expr *build(Sema &S, SourceLocation Loc) const = 0;
13528 Expr *build(Sema &S, SourceLocation Loc) const override {
13538 Expr *build(Sema &S, SourceLocation Loc) const override {
13550 Expr *build(Sema &S, SourceLocation Loc) const override {
13565 Expr *build(Sema &S, SourceLocation Loc) const override {
13581 Expr *build(Sema &S, SourceLocation Loc) const override {
13597 Expr *build(Sema &S, SourceLocation Loc) const override {
13608 Expr *build(Sema &S, SourceLocation Loc) const override {
13621 Expr *build(Sema &S, SourceLocation Loc) const override {
13637 buildMemcpyForAssignmentOp(Sema &S, SourceLocation Loc, QualType T,
13666 Sema::LookupOrdinaryName);
13696 /// \param S The Sema object used for type-checking.
13717 buildSingleCopyAssignRecursively(Sema &S, SourceLocation Loc, QualType T,
13741 LookupResult OpLookup(S, Name, Loc, Sema::LookupOrdinaryName);
13903 S.ActOnCondition(nullptr, Loc, Comparison, Sema::ConditionKind::Boolean),
13908 buildSingleCopyAssign(Sema &S, SourceLocation Loc, QualType T,
13928 CXXMethodDecl *Sema::DeclareImplicitCopyAssignment(CXXRecordDecl *ClassDecl) {
14012 static void diagnoseDeprecatedCopyOperation(Sema &S, CXXMethodDecl *CopyOp) {
14063 void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation,
14267 CXXMethodDecl *Sema::DeclareImplicitMoveAssignment(CXXRecordDecl *ClassDecl) {
14349 static void checkMoveAssignmentForRepeatedMove(Sema &S, CXXRecordDecl *Class,
14382 Sema::SpecialMemberOverloadResult SMOR =
14383 S.LookupSpecialMember(Base, Sema::CXXMoveAssignment,
14430 void Sema::DefineImplicitMoveAssignment(SourceLocation CurrentLocation,
14641 CXXConstructorDecl *Sema::DeclareImplicitCopyConstructor(
14733 void Sema::DefineImplicitCopyConstructor(SourceLocation CurrentLocation,
14770 Sema::CompoundScopeRAII CompoundScope(*this);
14781 CXXConstructorDecl *Sema::DeclareImplicitMoveConstructor(
14867 void Sema::DefineImplicitMoveConstructor(SourceLocation CurrentLocation,
14897 Sema::CompoundScopeRAII CompoundScope(*this);
14908 bool Sema::isImplicitlyDeleted(FunctionDecl *FD) {
14912 void Sema::DefineImplicitLambdaToFunctionPointerConversion(
14974 void Sema::DefineImplicitLambdaToBlockPointerConversion(
15046 Sema::BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
15084 Sema::BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
15110 Sema::BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
15141 ExprResult Sema::BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field) {
15205 void Sema::FinalizeVarWithDestructor(VarDecl *VD, const RecordType *Record) {
15267 bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor,
15273 // FIXME: This duplicates a lot of code from Sema::ConvertArgumentsForCall.
15307 CheckOperatorNewDeleteDeclarationScope(Sema &SemaRef,
15326 static CanQualType RemoveAddressSpaceFromPtr(Sema &SemaRef,
15336 CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl,
15407 CheckOperatorNewDeclaration(Sema &SemaRef, const FunctionDecl *FnDecl) {
15438 CheckOperatorDeleteDeclaration(Sema &SemaRef, FunctionDecl *FnDecl) {
15482 bool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) {
15617 checkLiteralOperatorTemplateParameterList(Sema &SemaRef,
15674 bool Sema::CheckLiteralOperatorDeclaration(FunctionDecl *FnDecl) {
15847 Decl *Sema::ActOnStartLinkageSpecification(Scope *S, SourceLocation ExternLoc,
15883 Decl *Sema::ActOnFinishLinkageSpecification(Scope *S,
15894 Decl *Sema::ActOnEmptyDeclaration(Scope *S,
15909 VarDecl *Sema::BuildExceptionDeclaration(Scope *S,
16041 Decl *Sema::ActOnExceptionDeclarator(Scope *S, Declarator &D) {
16092 Decl *Sema::ActOnStaticAssertDeclaration(SourceLocation StaticAssertLoc,
16106 Decl *Sema::BuildStaticAssertDeclaration(SourceLocation StaticAssertLoc,
16186 FriendDecl *Sema::CheckFriendTypeDecl(SourceLocation LocStart,
16258 Decl *Sema::ActOnTemplatedFriendTag(Scope *S, SourceLocation FriendLoc,
16392 Decl *Sema::ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS,
16483 NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D,
16802 void Sema::SetDeclDeleted(Decl *Dcl, SourceLocation DelLoc) {
16854 void Sema::SetDeclDefaulted(Decl *Dcl, SourceLocation DefaultLoc) {
16941 static void SearchForReturnInStmt(Sema &Self, Stmt *S) {
16953 void Sema::DiagnoseReturnInConstructorExceptionHandler(CXXTryStmt *TryBlock) {
16960 bool Sema::CheckOverridingFunctionAttributes(const CXXMethodDecl *New,
16997 // Sema::CheckFunctionDeclaration) is more clear.
17008 bool Sema::CheckOverridingFunctionReturnType(const CXXMethodDecl *New,
17119 bool Sema::CheckPureMethod(CXXMethodDecl *Method, SourceRange InitRange) {
17135 void Sema::ActOnPureSpecifier(Decl *D, SourceLocation ZeroLoc) {
17160 void Sema::ActOnCXXEnterDeclInitializer(Scope *S, Decl *D) {
17181 void Sema::ActOnCXXExitDeclInitializer(Scope *S, Decl *D) {
17196 DeclResult Sema::ActOnCXXConditionDeclaration(Scope *S, Declarator &D) {
17217 void Sema::LoadExternalVTableUses() {
17241 void Sema::MarkVTableUsed(SourceLocation Loc, CXXRecordDecl *Class,
17303 bool Sema::DefineUsedVTables() {
17397 void Sema::MarkVirtualMemberExceptionSpecsNeeded(SourceLocation Loc,
17404 void Sema::MarkVirtualMembersReferenced(SourceLocation Loc,
17441 void Sema::SetIvarInitializers(ObjCImplementationDecl *ObjCImplementation) {
17499 Sema &S) {
17559 void Sema::CheckDelegatingCtorCycles() {
17575 Sema &S;
17578 explicit FindCXXThisExpr(Sema &S) : S(S) { }
17588 bool Sema::checkThisInStaticMemberFunctionType(CXXMethodDecl *Method) {
17625 bool Sema::checkThisInStaticMemberFunctionExceptionSpec(CXXMethodDecl *Method) {
17667 bool Sema::checkThisInStaticMemberFunctionAttributes(CXXMethodDecl *Method) {
17714 void Sema::checkExceptionSpecification(
17763 void Sema::actOnDelayedExceptionSpecification(Decl *MethodD,
17802 MSPropertyDecl *Sema::HandleMSProperty(Scope *S, RecordDecl *Record,
17894 void Sema::ActOnStartFunctionDeclarationDeclarator(
17919 void Sema::ActOnFinishFunctionDeclarationDeclarator(Declarator &Declarator) {