Lines Matching defs:Constructor
2369 if (const CXXConstructorDecl *Constructor
2371 const CXXRecordDecl *RD = Constructor->getParent();
2379 if (Constructor->getNumCtorInitializers() == 0 &&
2391 } else if (!Constructor->isDependentContext() &&
2392 !Constructor->isDelegatingConstructor()) {
2411 Constructor->getNumCtorInitializers() != RD->getNumBases() + Fields) {
2416 for (const auto *I: Constructor->inits()) {
3700 const CXXConstructorDecl *Constructor;
3714 Constructor(nullptr), InitList(false), InitListFieldDecl(nullptr) {}
3829 if (Constructor)
3830 S.Diag(Constructor->getLocation(),
3832 << (Constructor->isDefaultConstructor() && Constructor->isImplicit());
3904 Constructor = FieldConstructor;
4026 Sema &SemaRef, const CXXConstructorDecl *Constructor) {
4029 Constructor->getLocation())) {
4033 if (Constructor->isInvalidDecl())
4036 const CXXRecordDecl *RD = Constructor->getParent();
4064 for (const auto *FieldInit : Constructor->inits()) {
4078 UninitializedChecker.CheckInitializer(InitExpr, Constructor,
4368 CXXConstructorDecl *Constructor
4370 if (!Constructor) {
4378 CXXRecordDecl *ClassDecl = Constructor->getParent();
4851 BuildImplicitBaseInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor,
4866 = InitializationKind::CreateDefault(Constructor->getLocation());
4875 ParmVarDecl *Param = Constructor->getParamDecl(0);
4881 Constructor->getLocation(), ParamType,
4903 = InitializationKind::CreateDirect(Constructor->getLocation(),
4934 BuildImplicitMemberInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor,
4941 SourceLocation Loc = Constructor->getLocation();
4945 ParmVarDecl *Param = Constructor->getParamDecl(0);
5055 SemaRef.Diag(Constructor->getLocation(),
5057 << (int)Constructor->isImplicit()
5058 << SemaRef.Context.getTagDeclType(Constructor->getParent())
5065 SemaRef.Diag(Constructor->getLocation(),
5067 << (int)Constructor->isImplicit()
5068 << SemaRef.Context.getTagDeclType(Constructor->getParent())
5266 Sema::SetDelegatingInitializer(CXXConstructorDecl *Constructor,
5269 Constructor->setNumCtorInitializers(1);
5273 Constructor->setCtorInitializers(initializer);
5275 if (CXXDestructorDecl *Dtor = LookupDestructor(Constructor->getParent())) {
5280 DelegatingCtorDecls.push_back(Constructor);
5282 DiagnoseUninitializedFields(*this, Constructor);
5287 bool Sema::SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors,
5289 if (Constructor->isDependentContext()) {
5293 Constructor->setNumCtorInitializers(Initializers.size());
5298 Constructor->setCtorInitializers(baseOrMemberInitializers);
5303 Constructor->setInvalidDecl();
5308 BaseAndFieldInfo Info(*this, Constructor, AnyErrors);
5312 CXXRecordDecl *ClassDecl = Constructor->getParent()->getDefinition();
5372 if (BuildImplicitBaseInitializer(*this, Constructor, Info.IIK,
5394 if (BuildImplicitBaseInitializer(*this, Constructor, Info.IIK,
5447 Constructor->setNumCtorInitializers(NumInitializers);
5452 Constructor->setCtorInitializers(baseOrMemberInitializers);
5456 MarkBaseAndMemberDestructorsReferenced(Constructor->getLocation(),
5457 Constructor->getParent());
5502 Sema &SemaRef, const CXXConstructorDecl *Constructor,
5504 if (Constructor->getDeclContext()->isDependentContext())
5526 const CXXRecordDecl *ClassDecl = Constructor->getParent();
5705 CXXConstructorDecl *Constructor
5708 if (!Constructor) {
5746 SetDelegatingInitializer(Constructor, MemInits[i]);
5755 DiagnoseBaseOrMemInitializerOrder(*this, Constructor, MemInits);
5757 SetCtorInitializers(Constructor, AnyErrors, MemInits);
5759 DiagnoseUninitializedFields(*this, Constructor);
5911 if (CXXConstructorDecl *Constructor
5913 if (CXXRecordDecl *ClassDecl = Constructor->getParent();
5917 SetCtorInitializers(Constructor, /*AnyErrors=*/false);
5918 DiagnoseUninitializedFields(*this, Constructor);
10800 if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(Method))
10801 CheckConstructor(Constructor);
10906 void Sema::CheckConstructor(CXXConstructorDecl *Constructor) {
10908 = dyn_cast<CXXRecordDecl>(Constructor->getDeclContext());
10910 return Constructor->setInvalidDecl();
10917 if (!Constructor->isInvalidDecl() &&
10918 Constructor->hasOneParamOrDefaultArgs() &&
10919 Constructor->getTemplateSpecializationKind() !=
10921 QualType ParamType = Constructor->getParamDecl(0)->getType();
10924 SourceLocation ParamLoc = Constructor->getParamDecl(0)->getLocation();
10926 = Constructor->getParamDecl(0)->getIdentifier() ? "const &"
10933 Constructor->setInvalidDecl();
13991 CXXConstructorDecl *Constructor) {
13992 assert((Constructor->isDefaulted() && Constructor->isDefaultConstructor() &&
13993 !Constructor->doesThisDeclarationHaveABody() &&
13994 !Constructor->isDeleted()) &&
13996 if (Constructor->willHaveBody() || Constructor->isInvalidDecl())
13999 CXXRecordDecl *ClassDecl = Constructor->getParent();
14005 SynthesizedFunctionScope Scope(*this, Constructor);
14010 Constructor->getType()->castAs<FunctionProtoType>());
14016 if (SetCtorInitializers(Constructor, /*AnyErrors=*/false)) {
14017 Constructor->setInvalidDecl();
14021 SourceLocation Loc = Constructor->getEndLoc().isValid()
14022 ? Constructor->getEndLoc()
14023 : Constructor->getLocation();
14024 Constructor->setBody(new (Context) CompoundStmt(Loc));
14025 Constructor->markUsed(Context);
14028 L->CompletedImplicitDefinition(Constructor);
14031 DiagnoseUninitializedFields(*this, Constructor);
14135 CXXConstructorDecl *Constructor) {
14136 CXXRecordDecl *ClassDecl = Constructor->getParent();
14137 assert(Constructor->getInheritedConstructor() &&
14138 !Constructor->doesThisDeclarationHaveABody() &&
14139 !Constructor->isDeleted());
14140 if (Constructor->willHaveBody() || Constructor->isInvalidDecl())
14145 SynthesizedFunctionScope Scope(*this, Constructor);
14150 Constructor->getType()->castAs<FunctionProtoType>());
14157 Constructor->getInheritedConstructor().getShadowDecl();
14159 Constructor->getInheritedConstructor().getConstructor();
14200 if (SetCtorInitializers(Constructor, /*AnyErrors*/false, Inits)) {
14201 Constructor->setInvalidDecl();
14205 Constructor->setBody(new (Context) CompoundStmt(InitLoc));
14206 Constructor->markUsed(Context);
14209 L->CompletedImplicitDefinition(Constructor);
14212 DiagnoseUninitializedFields(*this, Constructor);
16016 CXXConstructorDecl *Constructor, MultiExprArg ExprArgs,
16032 if (ConstructKind == CXXConstructionKind::Complete && Constructor &&
16038 Constructor->isCopyOrMoveConstructor() && hasOneRealArgument(ExprArgs)) {
16049 FoundDecl, Constructor,
16058 CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg ExprArgs,
16063 Constructor = findInheritingConstructor(ConstructLoc, Constructor, Shadow);
16067 if (DiagnoseUseOfOverloadedDecl(Constructor, ConstructLoc))
16072 ConstructLoc, DeclInitType, Constructor, Elidable, ExprArgs,
16081 CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg ExprArgs,
16086 Constructor->getParent(),
16089 MarkFunctionReferenced(ConstructLoc, Constructor);
16090 if (getLangOpts().CUDA && !CUDA().CheckCall(ConstructLoc, Constructor))
16095 Context, DeclInitType, ConstructLoc, Constructor, Elidable, ExprArgs,
16099 Constructor);
16165 bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor,
16175 const auto *Proto = Constructor->getType()->castAs<FunctionProtoType>();
16188 Loc, Constructor, Proto, 0, llvm::ArrayRef(Args, NumArgs), AllArgs,
16192 DiagnoseSentinelCalls(Constructor, Loc, AllArgs);
16194 CheckConstructorCall(Constructor, DeclInitType,