#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTLambda.h"
#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/ComparisonCategories.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/EvaluatedExprVisitor.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/AST/TypeLoc.h"
#include "clang/AST/TypeOrdering.h"
#include "clang/Basic/AttributeCommonInfo.h"
#include "clang/Basic/PartialDiagnostic.h"
#include "clang/Basic/Specifiers.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/LiteralSupport.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/CXXFieldCollector.h"
#include "clang/Sema/DeclSpec.h"
#include "clang/Sema/EnterExpressionEvaluationContext.h"
#include "clang/Sema/Initialization.h"
#include "clang/Sema/Lookup.h"
#include "clang/Sema/Ownership.h"
#include "clang/Sema/ParsedTemplate.h"
#include "clang/Sema/Scope.h"
#include "clang/Sema/ScopeInfo.h"
#include "clang/Sema/SemaCUDA.h"
#include "clang/Sema/SemaInternal.h"
#include "clang/Sema/SemaObjC.h"
#include "clang/Sema/SemaOpenMP.h"
#include "clang/Sema/Template.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/STLForwardCompat.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/SaveAndRestore.h"
#include <map>
#include <optional>
#include <set>
usingnamespaceclang;
namespace {
class CheckDefaultArgumentVisitor
: public ConstStmtVisitor<CheckDefaultArgumentVisitor, bool> { … };
bool CheckDefaultArgumentVisitor::VisitExpr(const Expr *Node) { … }
bool CheckDefaultArgumentVisitor::VisitDeclRefExpr(const DeclRefExpr *DRE) { … }
bool CheckDefaultArgumentVisitor::VisitCXXThisExpr(const CXXThisExpr *ThisE) { … }
bool CheckDefaultArgumentVisitor::VisitPseudoObjectExpr(
const PseudoObjectExpr *POE) { … }
bool CheckDefaultArgumentVisitor::VisitLambdaExpr(const LambdaExpr *Lambda) { … }
}
void
Sema::ImplicitExceptionSpecification::CalledDecl(SourceLocation CallLoc,
const CXXMethodDecl *Method) { … }
void Sema::ImplicitExceptionSpecification::CalledStmt(Stmt *S) { … }
ExprResult Sema::ConvertParamDefaultArgument(ParmVarDecl *Param, Expr *Arg,
SourceLocation EqualLoc) { … }
void Sema::SetParamDefaultArgument(ParmVarDecl *Param, Expr *Arg,
SourceLocation EqualLoc) { … }
void
Sema::ActOnParamDefaultArgument(Decl *param, SourceLocation EqualLoc,
Expr *DefaultArg) { … }
void Sema::ActOnParamUnparsedDefaultArgument(Decl *param,
SourceLocation EqualLoc,
SourceLocation ArgLoc) { … }
void Sema::ActOnParamDefaultArgumentError(Decl *param, SourceLocation EqualLoc,
Expr *DefaultArg) { … }
void Sema::CheckExtraCXXDefaultArguments(Declarator &D) { … }
static bool functionDeclHasDefaultArgument(const FunctionDecl *FD) { … }
bool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old,
Scope *S) { … }
void Sema::DiagPlaceholderVariableDefinition(SourceLocation Loc) { … }
NamedDecl *
Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D,
MultiTemplateParamsArg TemplateParamLists) { … }
static bool checkSimpleDecomposition(
Sema &S, ArrayRef<BindingDecl *> Bindings, ValueDecl *Src,
QualType DecompType, const llvm::APSInt &NumElems, QualType ElemType,
llvm::function_ref<ExprResult(SourceLocation, Expr *, unsigned)> GetInit) { … }
static bool checkArrayLikeDecomposition(Sema &S,
ArrayRef<BindingDecl *> Bindings,
ValueDecl *Src, QualType DecompType,
const llvm::APSInt &NumElems,
QualType ElemType) { … }
static bool checkArrayDecomposition(Sema &S, ArrayRef<BindingDecl*> Bindings,
ValueDecl *Src, QualType DecompType,
const ConstantArrayType *CAT) { … }
static bool checkVectorDecomposition(Sema &S, ArrayRef<BindingDecl*> Bindings,
ValueDecl *Src, QualType DecompType,
const VectorType *VT) { … }
static bool checkComplexDecomposition(Sema &S,
ArrayRef<BindingDecl *> Bindings,
ValueDecl *Src, QualType DecompType,
const ComplexType *CT) { … }
static std::string printTemplateArgs(const PrintingPolicy &PrintingPolicy,
TemplateArgumentListInfo &Args,
const TemplateParameterList *Params) { … }
static bool lookupStdTypeTraitMember(Sema &S, LookupResult &TraitMemberLookup,
SourceLocation Loc, StringRef Trait,
TemplateArgumentListInfo &Args,
unsigned DiagID) { … }
static TemplateArgumentLoc
getTrivialIntegralTemplateArgument(Sema &S, SourceLocation Loc, QualType T,
uint64_t I) { … }
static TemplateArgumentLoc
getTrivialTypeTemplateArgument(Sema &S, SourceLocation Loc, QualType T) { … }
namespace { enum class IsTupleLike { … }; }
static IsTupleLike isTupleLike(Sema &S, SourceLocation Loc, QualType T,
llvm::APSInt &Size) { … }
static QualType getTupleLikeElementType(Sema &S, SourceLocation Loc,
unsigned I, QualType T) { … }
namespace {
struct InitializingBinding { … };
}
static bool checkTupleLikeDecomposition(Sema &S,
ArrayRef<BindingDecl *> Bindings,
VarDecl *Src, QualType DecompType,
const llvm::APSInt &TupleSize) { … }
static DeclAccessPair findDecomposableBaseClass(Sema &S, SourceLocation Loc,
const CXXRecordDecl *RD,
CXXCastPath &BasePath) { … }
static bool checkMemberDecomposition(Sema &S, ArrayRef<BindingDecl*> Bindings,
ValueDecl *Src, QualType DecompType,
const CXXRecordDecl *OrigRD) { … }
void Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) { … }
void Sema::MergeVarDeclExceptionSpecs(VarDecl *New, VarDecl *Old) { … }
void Sema::CheckCXXDefaultArguments(FunctionDecl *FD) { … }
template <typename... Ts>
static bool CheckLiteralType(Sema &SemaRef, Sema::CheckConstexprKind Kind,
SourceLocation Loc, QualType T, unsigned DiagID,
Ts &&...DiagArgs) { … }
static bool CheckConstexprDestructorSubobjects(Sema &SemaRef,
const CXXDestructorDecl *DD,
Sema::CheckConstexprKind Kind) { … }
static bool CheckConstexprParameterTypes(Sema &SemaRef,
const FunctionDecl *FD,
Sema::CheckConstexprKind Kind) { … }
static bool CheckConstexprReturnType(Sema &SemaRef, const FunctionDecl *FD,
Sema::CheckConstexprKind Kind) { … }
static unsigned getRecordDiagFromTagKind(TagTypeKind Tag) { … }
static bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl,
Stmt *Body,
Sema::CheckConstexprKind Kind);
static bool CheckConstexprMissingReturn(Sema &SemaRef, const FunctionDecl *Dcl);
bool Sema::CheckConstexprFunctionDefinition(const FunctionDecl *NewFD,
CheckConstexprKind Kind) { … }
static bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl,
DeclStmt *DS, SourceLocation &Cxx1yLoc,
Sema::CheckConstexprKind Kind) { … }
static bool CheckConstexprCtorInitializer(Sema &SemaRef,
const FunctionDecl *Dcl,
FieldDecl *Field,
llvm::SmallSet<Decl*, 16> &Inits,
bool &Diagnosed,
Sema::CheckConstexprKind Kind) { … }
static bool
CheckConstexprFunctionStmt(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *S,
SmallVectorImpl<SourceLocation> &ReturnStmts,
SourceLocation &Cxx1yLoc, SourceLocation &Cxx2aLoc,
SourceLocation &Cxx2bLoc,
Sema::CheckConstexprKind Kind) { … }
static bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl,
Stmt *Body,
Sema::CheckConstexprKind Kind) { … }
static bool CheckConstexprMissingReturn(Sema &SemaRef,
const FunctionDecl *Dcl) { … }
bool Sema::CheckImmediateEscalatingFunctionDefinition(
FunctionDecl *FD, const sema::FunctionScopeInfo *FSI) { … }
void Sema::DiagnoseImmediateEscalatingReason(FunctionDecl *FD) { … }
CXXRecordDecl *Sema::getCurrentClass(Scope *, const CXXScopeSpec *SS) { … }
bool Sema::isCurrentClassName(const IdentifierInfo &II, Scope *S,
const CXXScopeSpec *SS) { … }
bool Sema::isCurrentClassNameTypo(IdentifierInfo *&II, const CXXScopeSpec *SS) { … }
CXXBaseSpecifier *Sema::CheckBaseSpecifier(CXXRecordDecl *Class,
SourceRange SpecifierRange,
bool Virtual, AccessSpecifier Access,
TypeSourceInfo *TInfo,
SourceLocation EllipsisLoc) { … }
BaseResult Sema::ActOnBaseSpecifier(Decl *classdecl, SourceRange SpecifierRange,
const ParsedAttributesView &Attributes,
bool Virtual, AccessSpecifier Access,
ParsedType basetype, SourceLocation BaseLoc,
SourceLocation EllipsisLoc) { … }
IndirectBaseSet;
static void
NoteIndirectBases(ASTContext &Context, IndirectBaseSet &Set,
const QualType &Type)
{ … }
bool Sema::AttachBaseSpecifiers(CXXRecordDecl *Class,
MutableArrayRef<CXXBaseSpecifier *> Bases) { … }
void Sema::ActOnBaseSpecifiers(Decl *ClassDecl,
MutableArrayRef<CXXBaseSpecifier *> Bases) { … }
bool Sema::IsDerivedFrom(SourceLocation Loc, QualType Derived, QualType Base) { … }
bool Sema::IsDerivedFrom(SourceLocation Loc, QualType Derived, QualType Base,
CXXBasePaths &Paths) { … }
static void BuildBasePathArray(const CXXBasePath &Path,
CXXCastPath &BasePathArray) { … }
void Sema::BuildBasePathArray(const CXXBasePaths &Paths,
CXXCastPath &BasePathArray) { … }
bool
Sema::CheckDerivedToBaseConversion(QualType Derived, QualType Base,
unsigned InaccessibleBaseID,
unsigned AmbiguousBaseConvID,
SourceLocation Loc, SourceRange Range,
DeclarationName Name,
CXXCastPath *BasePath,
bool IgnoreAccess) { … }
bool
Sema::CheckDerivedToBaseConversion(QualType Derived, QualType Base,
SourceLocation Loc, SourceRange Range,
CXXCastPath *BasePath,
bool IgnoreAccess) { … }
std::string Sema::getAmbiguousPathsDisplayString(CXXBasePaths &Paths) { … }
bool Sema::ActOnAccessSpecifier(AccessSpecifier Access, SourceLocation ASLoc,
SourceLocation ColonLoc,
const ParsedAttributesView &Attrs) { … }
void Sema::CheckOverrideControl(NamedDecl *D) { … }
void Sema::DiagnoseAbsenceOfOverrideControl(NamedDecl *D, bool Inconsistent) { … }
bool Sema::CheckIfOverriddenFunctionIsMarkedFinal(const CXXMethodDecl *New,
const CXXMethodDecl *Old) { … }
static bool InitializationHasSideEffects(const FieldDecl &FD) { … }
void Sema::CheckShadowInheritedFields(const SourceLocation &Loc,
DeclarationName FieldName,
const CXXRecordDecl *RD,
bool DeclIsField) { … }
NamedDecl *
Sema::ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D,
MultiTemplateParamsArg TemplateParameterLists,
Expr *BW, const VirtSpecifiers &VS,
InClassInitStyle InitStyle) { … }
namespace {
class UninitializedFieldVisitor
: public EvaluatedExprVisitor<UninitializedFieldVisitor> { … };
static void DiagnoseUninitializedFields(
Sema &SemaRef, const CXXConstructorDecl *Constructor) { … }
}
void Sema::ActOnStartCXXInClassMemberInitializer() { … }
void Sema::ActOnStartTrailingRequiresClause(Scope *S, Declarator &D) { … }
ExprResult Sema::ActOnFinishTrailingRequiresClause(ExprResult ConstraintExpr) { … }
ExprResult Sema::ActOnRequiresClause(ExprResult ConstraintExpr) { … }
ExprResult Sema::ConvertMemberDefaultInitExpression(FieldDecl *FD,
Expr *InitExpr,
SourceLocation InitLoc) { … }
void Sema::ActOnFinishCXXInClassMemberInitializer(Decl *D,
SourceLocation InitLoc,
Expr *InitExpr) { … }
static bool FindBaseInitializer(Sema &SemaRef,
CXXRecordDecl *ClassDecl,
QualType BaseType,
const CXXBaseSpecifier *&DirectBaseSpec,
const CXXBaseSpecifier *&VirtualBaseSpec) { … }
MemInitResult
Sema::ActOnMemInitializer(Decl *ConstructorD,
Scope *S,
CXXScopeSpec &SS,
IdentifierInfo *MemberOrBase,
ParsedType TemplateTypeTy,
const DeclSpec &DS,
SourceLocation IdLoc,
Expr *InitList,
SourceLocation EllipsisLoc) { … }
MemInitResult
Sema::ActOnMemInitializer(Decl *ConstructorD,
Scope *S,
CXXScopeSpec &SS,
IdentifierInfo *MemberOrBase,
ParsedType TemplateTypeTy,
const DeclSpec &DS,
SourceLocation IdLoc,
SourceLocation LParenLoc,
ArrayRef<Expr *> Args,
SourceLocation RParenLoc,
SourceLocation EllipsisLoc) { … }
namespace {
class MemInitializerValidatorCCC final : public CorrectionCandidateCallback { … };
}
bool Sema::DiagRedefinedPlaceholderFieldDecl(SourceLocation Loc,
RecordDecl *ClassDecl,
const IdentifierInfo *Name) { … }
ValueDecl *
Sema::tryLookupUnambiguousFieldDecl(RecordDecl *ClassDecl,
const IdentifierInfo *MemberOrBase) { … }
ValueDecl *Sema::tryLookupCtorInitMemberDecl(CXXRecordDecl *ClassDecl,
CXXScopeSpec &SS,
ParsedType TemplateTypeTy,
IdentifierInfo *MemberOrBase) { … }
MemInitResult
Sema::BuildMemInitializer(Decl *ConstructorD,
Scope *S,
CXXScopeSpec &SS,
IdentifierInfo *MemberOrBase,
ParsedType TemplateTypeTy,
const DeclSpec &DS,
SourceLocation IdLoc,
Expr *Init,
SourceLocation EllipsisLoc) { … }
MemInitResult
Sema::BuildMemberInitializer(ValueDecl *Member, Expr *Init,
SourceLocation IdLoc) { … }
MemInitResult
Sema::BuildDelegatingInitializer(TypeSourceInfo *TInfo, Expr *Init,
CXXRecordDecl *ClassDecl) { … }
MemInitResult
Sema::BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo,
Expr *Init, CXXRecordDecl *ClassDecl,
SourceLocation EllipsisLoc) { … }
static Expr *CastForMoving(Sema &SemaRef, Expr *E) { … }
enum ImplicitInitializerKind { … };
static bool
BuildImplicitBaseInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor,
ImplicitInitializerKind ImplicitInitKind,
CXXBaseSpecifier *BaseSpec,
bool IsInheritedVirtualBase,
CXXCtorInitializer *&CXXBaseInit) { … }
static bool RefersToRValueRef(Expr *MemRef) { … }
static bool
BuildImplicitMemberInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor,
ImplicitInitializerKind ImplicitInitKind,
FieldDecl *Field, IndirectFieldDecl *Indirect,
CXXCtorInitializer *&CXXMemberInit) { … }
namespace {
struct BaseAndFieldInfo { … };
}
static bool isIncompleteOrZeroLengthArrayType(ASTContext &Context, QualType T) { … }
static bool CollectFieldInitializer(Sema &SemaRef, BaseAndFieldInfo &Info,
FieldDecl *Field,
IndirectFieldDecl *Indirect = nullptr) { … }
bool
Sema::SetDelegatingInitializer(CXXConstructorDecl *Constructor,
CXXCtorInitializer *Initializer) { … }
bool Sema::SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors,
ArrayRef<CXXCtorInitializer *> Initializers) { … }
static void PopulateKeysForFields(FieldDecl *Field, SmallVectorImpl<const void*> &IdealInits) { … }
static const void *GetKeyForBase(ASTContext &Context, QualType BaseType) { … }
static const void *GetKeyForMember(ASTContext &Context,
CXXCtorInitializer *Member) { … }
static void AddInitializerToDiag(const Sema::SemaDiagnosticBuilder &Diag,
const CXXCtorInitializer *Previous,
const CXXCtorInitializer *Current) { … }
static void DiagnoseBaseOrMemInitializerOrder(
Sema &SemaRef, const CXXConstructorDecl *Constructor,
ArrayRef<CXXCtorInitializer *> Inits) { … }
namespace {
bool CheckRedundantInit(Sema &S,
CXXCtorInitializer *Init,
CXXCtorInitializer *&PrevInit) { … }
UnionEntry;
RedundantUnionMap;
bool CheckRedundantUnionInit(Sema &S,
CXXCtorInitializer *Init,
RedundantUnionMap &Unions) { … }
}
void Sema::ActOnMemInitializers(Decl *ConstructorDecl,
SourceLocation ColonLoc,
ArrayRef<CXXCtorInitializer*> MemInits,
bool AnyErrors) { … }
void
Sema::MarkBaseAndMemberDestructorsReferenced(SourceLocation Location,
CXXRecordDecl *ClassDecl) { … }
void Sema::MarkVirtualBaseDestructorsReferenced(
SourceLocation Location, CXXRecordDecl *ClassDecl,
llvm::SmallPtrSetImpl<const RecordType *> *DirectVirtualBases) { … }
void Sema::ActOnDefaultCtorInitializers(Decl *CDtorDecl) { … }
bool Sema::isAbstractType(SourceLocation Loc, QualType T) { … }
bool Sema::RequireNonAbstractType(SourceLocation Loc, QualType T,
TypeDiagnoser &Diagnoser) { … }
void Sema::DiagnoseAbstractType(const CXXRecordDecl *RD) { … }
namespace {
struct AbstractUsageInfo { … };
struct CheckAbstractUsage { … };
void AbstractUsageInfo::CheckType(const NamedDecl *D, TypeLoc TL,
Sema::AbstractDiagSelID Sel) { … }
}
static void CheckAbstractClassUsage(AbstractUsageInfo &Info,
FunctionDecl *FD) { … }
static void CheckAbstractClassUsage(AbstractUsageInfo &Info,
VarDecl *VD) { … }
static void CheckAbstractClassUsage(AbstractUsageInfo &Info,
CXXRecordDecl *RD) { … }
static void ReferenceDllExportedMembers(Sema &S, CXXRecordDecl *Class) { … }
static void checkForMultipleExportedDefaultConstructors(Sema &S,
CXXRecordDecl *Class) { … }
static void checkCUDADeviceBuiltinSurfaceClassTemplate(Sema &S,
CXXRecordDecl *Class) { … }
static void checkCUDADeviceBuiltinTextureClassTemplate(Sema &S,
CXXRecordDecl *Class) { … }
void Sema::checkClassLevelCodeSegAttribute(CXXRecordDecl *Class) { … }
void Sema::checkClassLevelDLLAttribute(CXXRecordDecl *Class) { … }
void Sema::propagateDLLAttrToBaseClassTemplate(
CXXRecordDecl *Class, Attr *ClassAttr,
ClassTemplateSpecializationDecl *BaseTemplateSpec, SourceLocation BaseLoc) { … }
Sema::DefaultedFunctionKind
Sema::getDefaultedFunctionKind(const FunctionDecl *FD) { … }
static void DefineDefaultedFunction(Sema &S, FunctionDecl *FD,
SourceLocation DefaultLoc) { … }
static bool canPassInRegisters(Sema &S, CXXRecordDecl *D,
TargetInfo::CallingConvKind CCK) { … }
static bool
ReportOverrides(Sema &S, unsigned DiagID, const CXXMethodDecl *MD,
llvm::function_ref<bool(const CXXMethodDecl *)> Report) { … }
void Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) { … }
static Sema::SpecialMemberOverloadResult
lookupCallFromSpecialMember(Sema &S, CXXRecordDecl *Class,
CXXSpecialMemberKind CSM, unsigned FieldQuals,
bool ConstRHS) { … }
class Sema::InheritedConstructorInfo { … };
static bool specialMemberIsConstexpr(
Sema &S, CXXRecordDecl *ClassDecl, CXXSpecialMemberKind CSM, unsigned Quals,
bool ConstRHS, CXXConstructorDecl *InheritedCtor = nullptr,
Sema::InheritedConstructorInfo *Inherited = nullptr) { … }
static bool defaultedSpecialMemberIsConstexpr(
Sema &S, CXXRecordDecl *ClassDecl, CXXSpecialMemberKind CSM, bool ConstArg,
CXXConstructorDecl *InheritedCtor = nullptr,
Sema::InheritedConstructorInfo *Inherited = nullptr) { … }
namespace {
struct ComputingExceptionSpec { … };
}
static Sema::ImplicitExceptionSpecification
ComputeDefaultedSpecialMemberExceptionSpec(Sema &S, SourceLocation Loc,
CXXMethodDecl *MD,
CXXSpecialMemberKind CSM,
Sema::InheritedConstructorInfo *ICI);
static Sema::ImplicitExceptionSpecification
ComputeDefaultedComparisonExceptionSpec(Sema &S, SourceLocation Loc,
FunctionDecl *FD,
Sema::DefaultedComparisonKind DCK);
static Sema::ImplicitExceptionSpecification
computeImplicitExceptionSpec(Sema &S, SourceLocation Loc, FunctionDecl *FD) { … }
static FunctionProtoType::ExtProtoInfo getImplicitMethodEPI(Sema &S,
CXXMethodDecl *MD) { … }
void Sema::EvaluateImplicitExceptionSpec(SourceLocation Loc, FunctionDecl *FD) { … }
void Sema::CheckExplicitlyDefaultedFunction(Scope *S, FunctionDecl *FD) { … }
bool Sema::CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD,
CXXSpecialMemberKind CSM,
SourceLocation DefaultLoc) { … }
namespace {
template<typename Derived, typename ResultList, typename Result,
typename Subobject>
class DefaultedComparisonVisitor { … };
struct DefaultedComparisonInfo { … };
struct DefaultedComparisonSubobject { … };
class DefaultedComparisonAnalyzer
: public DefaultedComparisonVisitor<DefaultedComparisonAnalyzer,
DefaultedComparisonInfo,
DefaultedComparisonInfo,
DefaultedComparisonSubobject> { … };
struct StmtListResult { … };
class DefaultedComparisonSynthesizer
: public DefaultedComparisonVisitor<DefaultedComparisonSynthesizer,
StmtListResult, StmtResult,
std::pair<ExprResult, ExprResult>> { … };
}
static void lookupOperatorsForDefaultedComparison(Sema &Self, Scope *S,
UnresolvedSetImpl &Operators,
OverloadedOperatorKind Op) { … }
bool Sema::CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *FD,
DefaultedComparisonKind DCK) { … }
void Sema::DeclareImplicitEqualityComparison(CXXRecordDecl *RD,
FunctionDecl *Spaceship) { … }
void Sema::DefineDefaultedComparison(SourceLocation UseLoc, FunctionDecl *FD,
DefaultedComparisonKind DCK) { … }
static Sema::ImplicitExceptionSpecification
ComputeDefaultedComparisonExceptionSpec(Sema &S, SourceLocation Loc,
FunctionDecl *FD,
Sema::DefaultedComparisonKind DCK) { … }
void Sema::CheckDelayedMemberExceptionSpecs() { … }
namespace {
template<typename Derived>
struct SpecialMemberVisitor { … };
}
namespace {
struct SpecialMemberDeletionInfo
: SpecialMemberVisitor<SpecialMemberDeletionInfo> { … };
}
bool SpecialMemberDeletionInfo::isAccessible(Subobject Subobj,
CXXMethodDecl *target) { … }
bool SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall(
Subobject Subobj, Sema::SpecialMemberOverloadResult SMOR,
bool IsDtorCallInCtor) { … }
bool SpecialMemberDeletionInfo::shouldDeleteForClassSubobject(
CXXRecordDecl *Class, Subobject Subobj, unsigned Quals) { … }
bool SpecialMemberDeletionInfo::shouldDeleteForVariantObjCPtrMember(
FieldDecl *FD, QualType FieldType) { … }
bool SpecialMemberDeletionInfo::shouldDeleteForBase(CXXBaseSpecifier *Base) { … }
bool SpecialMemberDeletionInfo::shouldDeleteForField(FieldDecl *FD) { … }
bool SpecialMemberDeletionInfo::shouldDeleteForAllConstMembers() { … }
bool Sema::ShouldDeleteSpecialMember(CXXMethodDecl *MD,
CXXSpecialMemberKind CSM,
InheritedConstructorInfo *ICI,
bool Diagnose) { … }
void Sema::DiagnoseDeletedDefaultedFunction(FunctionDecl *FD) { … }
static bool findTrivialSpecialMember(Sema &S, CXXRecordDecl *RD,
CXXSpecialMemberKind CSM, unsigned Quals,
bool ConstRHS,
Sema::TrivialABIHandling TAH,
CXXMethodDecl **Selected) { … }
static CXXConstructorDecl *findUserDeclaredCtor(CXXRecordDecl *RD) { … }
enum TrivialSubobjectKind { … };
static bool checkTrivialSubobjectCall(Sema &S, SourceLocation SubobjLoc,
QualType SubType, bool ConstRHS,
CXXSpecialMemberKind CSM,
TrivialSubobjectKind Kind,
Sema::TrivialABIHandling TAH,
bool Diagnose) { … }
static bool checkTrivialClassMembers(Sema &S, CXXRecordDecl *RD,
CXXSpecialMemberKind CSM, bool ConstArg,
Sema::TrivialABIHandling TAH,
bool Diagnose) { … }
void Sema::DiagnoseNontrivial(const CXXRecordDecl *RD,
CXXSpecialMemberKind CSM) { … }
bool Sema::SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMemberKind CSM,
TrivialABIHandling TAH, bool Diagnose) { … }
namespace {
struct FindHiddenVirtualMethod { … };
}
static void AddMostOverridenMethods(const CXXMethodDecl *MD,
llvm::SmallPtrSetImpl<const CXXMethodDecl *>& Methods) { … }
void Sema::FindHiddenVirtualMethods(CXXMethodDecl *MD,
SmallVectorImpl<CXXMethodDecl*> &OverloadedMethods) { … }
void Sema::NoteHiddenVirtualMethods(CXXMethodDecl *MD,
SmallVectorImpl<CXXMethodDecl*> &OverloadedMethods) { … }
void Sema::DiagnoseHiddenVirtualMethods(CXXMethodDecl *MD) { … }
void Sema::checkIllFormedTrivialABIStruct(CXXRecordDecl &RD) { … }
void Sema::checkIncorrectVTablePointerAuthenticationAttribute(
CXXRecordDecl &RD) { … }
void Sema::ActOnFinishCXXMemberSpecification(
Scope *S, SourceLocation RLoc, Decl *TagDecl, SourceLocation LBrac,
SourceLocation RBrac, const ParsedAttributesView &AttrList) { … }
static void findImplicitlyDeclaredEqualityComparisons(
ASTContext &Ctx, CXXRecordDecl *RD,
llvm::SmallVectorImpl<FunctionDecl *> &Spaceships) { … }
void Sema::AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl) { … }
unsigned
Sema::ActOnReenterTemplateScope(Decl *D,
llvm::function_ref<Scope *()> EnterScope) { … }
void Sema::ActOnStartDelayedMemberDeclarations(Scope *S, Decl *RecordD) { … }
void Sema::ActOnFinishDelayedMemberDeclarations(Scope *S, Decl *RecordD) { … }
void Sema::ActOnReenterCXXMethodParameter(Scope *S, ParmVarDecl *Param) { … }
void Sema::ActOnStartDelayedCXXMethodDeclaration(Scope *S, Decl *MethodD) { … }
void Sema::ActOnDelayedCXXMethodParameter(Scope *S, Decl *ParamD) { … }
void Sema::ActOnFinishDelayedCXXMethodDeclaration(Scope *S, Decl *MethodD) { … }
static void checkMethodTypeQualifiers(Sema &S, Declarator &D, unsigned DiagID) { … }
QualType Sema::CheckConstructorDeclarator(Declarator &D, QualType R,
StorageClass &SC) { … }
void Sema::CheckConstructor(CXXConstructorDecl *Constructor) { … }
bool Sema::CheckDestructor(CXXDestructorDecl *Destructor) { … }
QualType Sema::CheckDestructorDeclarator(Declarator &D, QualType R,
StorageClass& SC) { … }
static void extendLeft(SourceRange &R, SourceRange Before) { … }
static void extendRight(SourceRange &R, SourceRange After) { … }
void Sema::CheckConversionDeclarator(Declarator &D, QualType &R,
StorageClass& SC) { … }
Decl *Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) { … }
void Sema::CheckExplicitObjectMemberFunction(DeclContext *DC, Declarator &D,
DeclarationName Name, QualType R) { … }
void Sema::CheckExplicitObjectLambda(Declarator &D) { … }
void Sema::CheckExplicitObjectMemberFunction(Declarator &D,
DeclarationName Name, QualType R,
bool IsLambda, DeclContext *DC) { … }
namespace {
struct BadSpecifierDiagnoser { … };
}
bool Sema::CheckDeductionGuideDeclarator(Declarator &D, QualType &R,
StorageClass &SC) { … }
static void DiagnoseNamespaceInlineMismatch(Sema &S, SourceLocation KeywordLoc,
SourceLocation Loc,
IdentifierInfo *II, bool *IsInline,
NamespaceDecl *PrevNS) { … }
Decl *Sema::ActOnStartNamespaceDef(Scope *NamespcScope,
SourceLocation InlineLoc,
SourceLocation NamespaceLoc,
SourceLocation IdentLoc, IdentifierInfo *II,
SourceLocation LBrace,
const ParsedAttributesView &AttrList,
UsingDirectiveDecl *&UD, bool IsNested) { … }
static inline NamespaceDecl *getNamespaceDecl(NamedDecl *D) { … }
void Sema::ActOnFinishNamespaceDef(Decl *Dcl, SourceLocation RBrace) { … }
CXXRecordDecl *Sema::getStdBadAlloc() const { … }
EnumDecl *Sema::getStdAlignValT() const { … }
NamespaceDecl *Sema::getStdNamespace() const { … }
namespace {
enum UnsupportedSTLSelect { … };
struct InvalidSTLDiagnoser { … };
}
QualType Sema::CheckComparisonCategoryType(ComparisonCategoryType Kind,
SourceLocation Loc,
ComparisonCategoryUsage Usage) { … }
NamespaceDecl *Sema::getOrCreateStdNamespace() { … }
bool Sema::isStdInitializerList(QualType Ty, QualType *Element) { … }
static ClassTemplateDecl *LookupStdInitializerList(Sema &S, SourceLocation Loc){ … }
QualType Sema::BuildStdInitializerList(QualType Element, SourceLocation Loc) { … }
bool Sema::isInitListConstructor(const FunctionDecl *Ctor) { … }
static bool IsUsingDirectiveInToplevelContext(DeclContext *CurContext) { … }
namespace {
class NamespaceValidatorCCC final : public CorrectionCandidateCallback { … };
}
static void DiagnoseInvisibleNamespace(const TypoCorrection &Corrected,
Sema &S) { … }
static bool TryNamespaceTypoCorrection(Sema &S, LookupResult &R, Scope *Sc,
CXXScopeSpec &SS,
SourceLocation IdentLoc,
IdentifierInfo *Ident) { … }
Decl *Sema::ActOnUsingDirective(Scope *S, SourceLocation UsingLoc,
SourceLocation NamespcLoc, CXXScopeSpec &SS,
SourceLocation IdentLoc,
IdentifierInfo *NamespcName,
const ParsedAttributesView &AttrList) { … }
void Sema::PushUsingDirective(Scope *S, UsingDirectiveDecl *UDir) { … }
Decl *Sema::ActOnUsingDeclaration(Scope *S, AccessSpecifier AS,
SourceLocation UsingLoc,
SourceLocation TypenameLoc, CXXScopeSpec &SS,
UnqualifiedId &Name,
SourceLocation EllipsisLoc,
const ParsedAttributesView &AttrList) { … }
Decl *Sema::ActOnUsingEnumDeclaration(Scope *S, AccessSpecifier AS,
SourceLocation UsingLoc,
SourceLocation EnumLoc, SourceRange TyLoc,
const IdentifierInfo &II, ParsedType Ty,
CXXScopeSpec *SS) { … }
static bool
IsEquivalentForUsingDecl(ASTContext &Context, NamedDecl *D1, NamedDecl *D2) { … }
bool Sema::CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Orig,
const LookupResult &Previous,
UsingShadowDecl *&PrevShadow) { … }
static bool isVirtualDirectBase(CXXRecordDecl *Derived, CXXRecordDecl *Base) { … }
UsingShadowDecl *Sema::BuildUsingShadowDecl(Scope *S, BaseUsingDecl *BUD,
NamedDecl *Orig,
UsingShadowDecl *PrevDecl) { … }
void Sema::HideUsingShadowDecl(Scope *S, UsingShadowDecl *Shadow) { … }
static CXXBaseSpecifier *findDirectBaseWithType(CXXRecordDecl *Derived,
QualType DesiredBase,
bool &AnyDependentBases) { … }
namespace {
class UsingValidatorCCC final : public CorrectionCandidateCallback { … };
}
void Sema::FilterUsingLookup(Scope *S, LookupResult &Previous) { … }
NamedDecl *Sema::BuildUsingDeclaration(
Scope *S, AccessSpecifier AS, SourceLocation UsingLoc,
bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS,
DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc,
const ParsedAttributesView &AttrList, bool IsInstantiation,
bool IsUsingIfExists) { … }
NamedDecl *Sema::BuildUsingEnumDeclaration(Scope *S, AccessSpecifier AS,
SourceLocation UsingLoc,
SourceLocation EnumLoc,
SourceLocation NameLoc,
TypeSourceInfo *EnumType,
EnumDecl *ED) { … }
NamedDecl *Sema::BuildUsingPackDecl(NamedDecl *InstantiatedFrom,
ArrayRef<NamedDecl *> Expansions) { … }
bool Sema::CheckInheritingConstructorUsingDecl(UsingDecl *UD) { … }
bool Sema::CheckUsingDeclRedeclaration(SourceLocation UsingLoc,
bool HasTypenameKeyword,
const CXXScopeSpec &SS,
SourceLocation NameLoc,
const LookupResult &Prev) { … }
bool Sema::CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename,
const CXXScopeSpec &SS,
const DeclarationNameInfo &NameInfo,
SourceLocation NameLoc,
const LookupResult *R, const UsingDecl *UD) { … }
Decl *Sema::ActOnAliasDeclaration(Scope *S, AccessSpecifier AS,
MultiTemplateParamsArg TemplateParamLists,
SourceLocation UsingLoc, UnqualifiedId &Name,
const ParsedAttributesView &AttrList,
TypeResult Type, Decl *DeclFromDeclSpec) { … }
Decl *Sema::ActOnNamespaceAliasDef(Scope *S, SourceLocation NamespaceLoc,
SourceLocation AliasLoc,
IdentifierInfo *Alias, CXXScopeSpec &SS,
SourceLocation IdentLoc,
IdentifierInfo *Ident) { … }
namespace {
struct SpecialMemberExceptionSpecInfo
: SpecialMemberVisitor<SpecialMemberExceptionSpecInfo> { … };
}
bool SpecialMemberExceptionSpecInfo::visitBase(CXXBaseSpecifier *Base) { … }
bool SpecialMemberExceptionSpecInfo::visitField(FieldDecl *FD) { … }
void SpecialMemberExceptionSpecInfo::visitClassSubobject(CXXRecordDecl *Class,
Subobject Subobj,
unsigned Quals) { … }
void SpecialMemberExceptionSpecInfo::visitSubobjectCall(
Subobject Subobj, Sema::SpecialMemberOverloadResult SMOR) { … }
bool Sema::tryResolveExplicitSpecifier(ExplicitSpecifier &ExplicitSpec) { … }
ExplicitSpecifier Sema::ActOnExplicitBoolSpecifier(Expr *ExplicitExpr) { … }
static Sema::ImplicitExceptionSpecification
ComputeDefaultedSpecialMemberExceptionSpec(
Sema &S, SourceLocation Loc, CXXMethodDecl *MD, CXXSpecialMemberKind CSM,
Sema::InheritedConstructorInfo *ICI) { … }
namespace {
struct DeclaringSpecialMember { … };
}
void Sema::CheckImplicitSpecialMemberDeclaration(Scope *S, FunctionDecl *FD) { … }
void Sema::setupImplicitSpecialMemberType(CXXMethodDecl *SpecialMem,
QualType ResultTy,
ArrayRef<QualType> Args) { … }
CXXConstructorDecl *Sema::DeclareImplicitDefaultConstructor(
CXXRecordDecl *ClassDecl) { … }
void Sema::DefineImplicitDefaultConstructor(SourceLocation CurrentLocation,
CXXConstructorDecl *Constructor) { … }
void Sema::ActOnFinishDelayedMemberInitializers(Decl *D) { … }
CXXConstructorDecl *
Sema::findInheritingConstructor(SourceLocation Loc,
CXXConstructorDecl *BaseCtor,
ConstructorUsingShadowDecl *Shadow) { … }
void Sema::NoteDeletedInheritingConstructor(CXXConstructorDecl *Ctor) { … }
void Sema::DefineInheritingConstructor(SourceLocation CurrentLocation,
CXXConstructorDecl *Constructor) { … }
CXXDestructorDecl *Sema::DeclareImplicitDestructor(CXXRecordDecl *ClassDecl) { … }
void Sema::DefineImplicitDestructor(SourceLocation CurrentLocation,
CXXDestructorDecl *Destructor) { … }
void Sema::CheckCompleteDestructorVariant(SourceLocation CurrentLocation,
CXXDestructorDecl *Destructor) { … }
void Sema::ActOnFinishCXXMemberDecls() { … }
void Sema::ActOnFinishCXXNonNestedClass() { … }
void Sema::referenceDLLExportedClassMethods() { … }
void Sema::AdjustDestructorExceptionSpec(CXXDestructorDecl *Destructor) { … }
namespace {
class ExprBuilder { … };
class RefBuilder: public ExprBuilder { … };
class ThisBuilder: public ExprBuilder { … };
class CastBuilder: public ExprBuilder { … };
class DerefBuilder: public ExprBuilder { … };
class MemberBuilder: public ExprBuilder { … };
class MoveCastBuilder: public ExprBuilder { … };
class LvalueConvBuilder: public ExprBuilder { … };
class SubscriptBuilder: public ExprBuilder { … };
}
static StmtResult
buildMemcpyForAssignmentOp(Sema &S, SourceLocation Loc, QualType T,
const ExprBuilder &ToB, const ExprBuilder &FromB) { … }
static StmtResult
buildSingleCopyAssignRecursively(Sema &S, SourceLocation Loc, QualType T,
const ExprBuilder &To, const ExprBuilder &From,
bool CopyingBaseSubobject, bool Copying,
unsigned Depth = 0) { … }
static StmtResult
buildSingleCopyAssign(Sema &S, SourceLocation Loc, QualType T,
const ExprBuilder &To, const ExprBuilder &From,
bool CopyingBaseSubobject, bool Copying) { … }
CXXMethodDecl *Sema::DeclareImplicitCopyAssignment(CXXRecordDecl *ClassDecl) { … }
static void diagnoseDeprecatedCopyOperation(Sema &S, CXXMethodDecl *CopyOp) { … }
void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation,
CXXMethodDecl *CopyAssignOperator) { … }
CXXMethodDecl *Sema::DeclareImplicitMoveAssignment(CXXRecordDecl *ClassDecl) { … }
static void checkMoveAssignmentForRepeatedMove(Sema &S, CXXRecordDecl *Class,
SourceLocation CurrentLocation) { … }
void Sema::DefineImplicitMoveAssignment(SourceLocation CurrentLocation,
CXXMethodDecl *MoveAssignOperator) { … }
CXXConstructorDecl *Sema::DeclareImplicitCopyConstructor(
CXXRecordDecl *ClassDecl) { … }
void Sema::DefineImplicitCopyConstructor(SourceLocation CurrentLocation,
CXXConstructorDecl *CopyConstructor) { … }
CXXConstructorDecl *Sema::DeclareImplicitMoveConstructor(
CXXRecordDecl *ClassDecl) { … }
void Sema::DefineImplicitMoveConstructor(SourceLocation CurrentLocation,
CXXConstructorDecl *MoveConstructor) { … }
bool Sema::isImplicitlyDeleted(FunctionDecl *FD) { … }
void Sema::DefineImplicitLambdaToFunctionPointerConversion(
SourceLocation CurrentLocation,
CXXConversionDecl *Conv) { … }
void Sema::DefineImplicitLambdaToBlockPointerConversion(
SourceLocation CurrentLocation, CXXConversionDecl *Conv) { … }
static bool hasOneRealArgument(MultiExprArg Args) { … }
ExprResult Sema::BuildCXXConstructExpr(
SourceLocation ConstructLoc, QualType DeclInitType, NamedDecl *FoundDecl,
CXXConstructorDecl *Constructor, MultiExprArg ExprArgs,
bool HadMultipleCandidates, bool IsListInitialization,
bool IsStdInitListInitialization, bool RequiresZeroInit,
CXXConstructionKind ConstructKind, SourceRange ParenRange) { … }
ExprResult Sema::BuildCXXConstructExpr(
SourceLocation ConstructLoc, QualType DeclInitType, NamedDecl *FoundDecl,
CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg ExprArgs,
bool HadMultipleCandidates, bool IsListInitialization,
bool IsStdInitListInitialization, bool RequiresZeroInit,
CXXConstructionKind ConstructKind, SourceRange ParenRange) { … }
ExprResult Sema::BuildCXXConstructExpr(
SourceLocation ConstructLoc, QualType DeclInitType,
CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg ExprArgs,
bool HadMultipleCandidates, bool IsListInitialization,
bool IsStdInitListInitialization, bool RequiresZeroInit,
CXXConstructionKind ConstructKind, SourceRange ParenRange) { … }
void Sema::FinalizeVarWithDestructor(VarDecl *VD, const RecordType *Record) { … }
bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor,
QualType DeclInitType, MultiExprArg ArgsPtr,
SourceLocation Loc,
SmallVectorImpl<Expr *> &ConvertedArgs,
bool AllowExplicit,
bool IsListInitialization) { … }
static inline bool
CheckOperatorNewDeleteDeclarationScope(Sema &SemaRef,
const FunctionDecl *FnDecl) { … }
static CanQualType RemoveAddressSpaceFromPtr(Sema &SemaRef,
const PointerType *PtrTy) { … }
static inline bool
CheckOperatorNewDeleteTypes(Sema &SemaRef, const FunctionDecl *FnDecl,
CanQualType ExpectedResultType,
CanQualType ExpectedFirstParamType,
unsigned DependentParamTypeDiag,
unsigned InvalidParamTypeDiag) { … }
static bool
CheckOperatorNewDeclaration(Sema &SemaRef, const FunctionDecl *FnDecl) { … }
static bool
CheckOperatorDeleteDeclaration(Sema &SemaRef, FunctionDecl *FnDecl) { … }
bool Sema::CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl) { … }
static bool
checkLiteralOperatorTemplateParameterList(Sema &SemaRef,
FunctionTemplateDecl *TpDecl) { … }
bool Sema::CheckLiteralOperatorDeclaration(FunctionDecl *FnDecl) { … }
Decl *Sema::ActOnStartLinkageSpecification(Scope *S, SourceLocation ExternLoc,
Expr *LangStr,
SourceLocation LBraceLoc) { … }
Decl *Sema::ActOnFinishLinkageSpecification(Scope *S,
Decl *LinkageSpec,
SourceLocation RBraceLoc) { … }
Decl *Sema::ActOnEmptyDeclaration(Scope *S,
const ParsedAttributesView &AttrList,
SourceLocation SemiLoc) { … }
VarDecl *Sema::BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo,
SourceLocation StartLoc,
SourceLocation Loc,
const IdentifierInfo *Name) { … }
Decl *Sema::ActOnExceptionDeclarator(Scope *S, Declarator &D) { … }
Decl *Sema::ActOnStaticAssertDeclaration(SourceLocation StaticAssertLoc,
Expr *AssertExpr,
Expr *AssertMessageExpr,
SourceLocation RParenLoc) { … }
static void WriteCharTypePrefix(BuiltinType::Kind BTK, llvm::raw_ostream &OS) { … }
static void WriteCharValueForDiagnostic(uint32_t Value, const BuiltinType *BTy,
unsigned TyWidth,
SmallVectorImpl<char> &Str) { … }
static bool ConvertAPValueToString(const APValue &V, QualType T,
SmallVectorImpl<char> &Str,
ASTContext &Context) { … }
static bool UsefulToPrintExpr(const Expr *E) { … }
void Sema::DiagnoseStaticAssertDetails(const Expr *E) { … }
bool Sema::EvaluateStaticAssertMessageAsString(Expr *Message,
std::string &Result,
ASTContext &Ctx,
bool ErrorOnInvalidMessage) { … }
Decl *Sema::BuildStaticAssertDeclaration(SourceLocation StaticAssertLoc,
Expr *AssertExpr, Expr *AssertMessage,
SourceLocation RParenLoc,
bool Failed) { … }
DeclResult Sema::ActOnTemplatedFriendTag(
Scope *S, SourceLocation FriendLoc, unsigned TagSpec, SourceLocation TagLoc,
CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc,
SourceLocation EllipsisLoc, const ParsedAttributesView &Attr,
MultiTemplateParamsArg TempParamLists) { … }
Decl *Sema::ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS,
MultiTemplateParamsArg TempParams,
SourceLocation EllipsisLoc) { … }
NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D,
MultiTemplateParamsArg TemplateParams) { … }
void Sema::SetDeclDeleted(Decl *Dcl, SourceLocation DelLoc,
StringLiteral *Message) { … }
void Sema::SetDeclDefaulted(Decl *Dcl, SourceLocation DefaultLoc) { … }
static void SearchForReturnInStmt(Sema &Self, Stmt *S) { … }
void Sema::DiagnoseReturnInConstructorExceptionHandler(CXXTryStmt *TryBlock) { … }
void Sema::SetFunctionBodyKind(Decl *D, SourceLocation Loc, FnBodyKind BodyKind,
StringLiteral *DeletedMessage) { … }
bool Sema::CheckOverridingFunctionAttributes(CXXMethodDecl *New,
const CXXMethodDecl *Old) { … }
bool Sema::CheckExplicitObjectOverride(CXXMethodDecl *New,
const CXXMethodDecl *Old) { … }
bool Sema::CheckOverridingFunctionReturnType(const CXXMethodDecl *New,
const CXXMethodDecl *Old) { … }
bool Sema::CheckPureMethod(CXXMethodDecl *Method, SourceRange InitRange) { … }
void Sema::ActOnPureSpecifier(Decl *D, SourceLocation ZeroLoc) { … }
void Sema::ActOnCXXEnterDeclInitializer(Scope *S, Decl *D) { … }
void Sema::ActOnCXXExitDeclInitializer(Scope *S, Decl *D) { … }
DeclResult Sema::ActOnCXXConditionDeclaration(Scope *S, Declarator &D) { … }
void Sema::LoadExternalVTableUses() { … }
void Sema::MarkVTableUsed(SourceLocation Loc, CXXRecordDecl *Class,
bool DefinitionRequired) { … }
bool Sema::DefineUsedVTables() { … }
void Sema::MarkVirtualMemberExceptionSpecsNeeded(SourceLocation Loc,
const CXXRecordDecl *RD) { … }
void Sema::MarkVirtualMembersReferenced(SourceLocation Loc,
const CXXRecordDecl *RD,
bool ConstexprOnly) { … }
static
void DelegatingCycleHelper(CXXConstructorDecl* Ctor,
llvm::SmallPtrSet<CXXConstructorDecl*, 4> &Valid,
llvm::SmallPtrSet<CXXConstructorDecl*, 4> &Invalid,
llvm::SmallPtrSet<CXXConstructorDecl*, 4> &Current,
Sema &S) { … }
void Sema::CheckDelegatingCtorCycles() { … }
namespace {
class FindCXXThisExpr : public RecursiveASTVisitor<FindCXXThisExpr> { … };
}
bool Sema::checkThisInStaticMemberFunctionType(CXXMethodDecl *Method) { … }
bool Sema::checkThisInStaticMemberFunctionExceptionSpec(CXXMethodDecl *Method) { … }bool Sema::checkThisInStaticMemberFunctionAttributes(CXXMethodDecl *Method) { … }void Sema::checkExceptionSpecification(
bool IsTopLevel, ExceptionSpecificationType EST,
ArrayRef<ParsedType> DynamicExceptions,
ArrayRef<SourceRange> DynamicExceptionRanges, Expr *NoexceptExpr,
SmallVectorImpl<QualType> &Exceptions,
FunctionProtoType::ExceptionSpecInfo &ESI) { … }void Sema::actOnDelayedExceptionSpecification(
Decl *D, ExceptionSpecificationType EST, SourceRange SpecificationRange,
ArrayRef<ParsedType> DynamicExceptions,
ArrayRef<SourceRange> DynamicExceptionRanges, Expr *NoexceptExpr) { … }MSPropertyDecl *Sema::HandleMSProperty(Scope *S, RecordDecl *Record,
SourceLocation DeclStart, Declarator &D,
Expr *BitWidth,
InClassInitStyle InitStyle,
AccessSpecifier AS,
const ParsedAttr &MSPropertyAttr) { … }void Sema::ActOnStartFunctionDeclarationDeclarator(
Declarator &Declarator, unsigned TemplateParameterDepth) { … }void Sema::ActOnFinishFunctionDeclarationDeclarator(Declarator &Declarator) { … }