Lines Matching refs:Constructor

2321   if (const CXXConstructorDecl *Constructor
2323 const CXXRecordDecl *RD = Constructor->getParent();
2331 if (Constructor->getNumCtorInitializers() == 0 &&
2343 } else if (!Constructor->isDependentContext() &&
2344 !Constructor->isDelegatingConstructor()) {
2363 Constructor->getNumCtorInitializers() != RD->getNumBases() + Fields) {
2368 for (const auto *I: Constructor->inits()) {
3637 const CXXConstructorDecl *Constructor;
3651 Constructor(nullptr), InitList(false), InitListFieldDecl(nullptr) {}
3766 if (Constructor)
3767 S.Diag(Constructor->getLocation(),
3769 << (Constructor->isDefaultConstructor() && Constructor->isImplicit());
3841 Constructor = FieldConstructor;
3963 Sema &SemaRef, const CXXConstructorDecl *Constructor) {
3966 Constructor->getLocation())) {
3970 if (Constructor->isInvalidDecl())
3973 const CXXRecordDecl *RD = Constructor->getParent();
4001 for (const auto *FieldInit : Constructor->inits()) {
4015 UninitializedChecker.CheckInitializer(InitExpr, Constructor,
4301 CXXConstructorDecl *Constructor
4303 if (!Constructor) {
4311 CXXRecordDecl *ClassDecl = Constructor->getParent();
4783 BuildImplicitBaseInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor,
4798 = InitializationKind::CreateDefault(Constructor->getLocation());
4807 ParmVarDecl *Param = Constructor->getParamDecl(0);
4813 Constructor->getLocation(), ParamType,
4835 = InitializationKind::CreateDirect(Constructor->getLocation(),
4866 BuildImplicitMemberInitializer(Sema &SemaRef, CXXConstructorDecl *Constructor,
4873 SourceLocation Loc = Constructor->getLocation();
4877 ParmVarDecl *Param = Constructor->getParamDecl(0);
4988 SemaRef.Diag(Constructor->getLocation(),
4990 << (int)Constructor->isImplicit()
4991 << SemaRef.Context.getTagDeclType(Constructor->getParent())
4998 SemaRef.Diag(Constructor->getLocation(),
5000 << (int)Constructor->isImplicit()
5001 << SemaRef.Context.getTagDeclType(Constructor->getParent())
5199 Sema::SetDelegatingInitializer(CXXConstructorDecl *Constructor,
5202 Constructor->setNumCtorInitializers(1);
5206 Constructor->setCtorInitializers(initializer);
5208 if (CXXDestructorDecl *Dtor = LookupDestructor(Constructor->getParent())) {
5213 DelegatingCtorDecls.push_back(Constructor);
5215 DiagnoseUninitializedFields(*this, Constructor);
5220 bool Sema::SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors,
5222 if (Constructor->isDependentContext()) {
5226 Constructor->setNumCtorInitializers(Initializers.size());
5231 Constructor->setCtorInitializers(baseOrMemberInitializers);
5236 Constructor->setInvalidDecl();
5241 BaseAndFieldInfo Info(*this, Constructor, AnyErrors);
5245 CXXRecordDecl *ClassDecl = Constructor->getParent()->getDefinition();
5305 if (BuildImplicitBaseInitializer(*this, Constructor, Info.IIK,
5327 if (BuildImplicitBaseInitializer(*this, Constructor, Info.IIK,
5380 Constructor->setNumCtorInitializers(NumInitializers);
5385 Constructor->setCtorInitializers(baseOrMemberInitializers);
5389 MarkBaseAndMemberDestructorsReferenced(Constructor->getLocation(),
5390 Constructor->getParent());
5435 Sema &SemaRef, const CXXConstructorDecl *Constructor,
5437 if (Constructor->getDeclContext()->isDependentContext())
5459 const CXXRecordDecl *ClassDecl = Constructor->getParent();
5638 CXXConstructorDecl *Constructor
5641 if (!Constructor) {
5679 SetDelegatingInitializer(Constructor, MemInits[i]);
5688 DiagnoseBaseOrMemInitializerOrder(*this, Constructor, MemInits);
5690 SetCtorInitializers(Constructor, AnyErrors, MemInits);
5692 DiagnoseUninitializedFields(*this, Constructor);
5844 if (CXXConstructorDecl *Constructor
5846 if (CXXRecordDecl *ClassDecl = Constructor->getParent();
5850 SetCtorInitializers(Constructor, /*AnyErrors=*/false);
5851 DiagnoseUninitializedFields(*this, Constructor);
10719 if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(Method))
10720 CheckConstructor(Constructor);
10808 void Sema::CheckConstructor(CXXConstructorDecl *Constructor) {
10810 = dyn_cast<CXXRecordDecl>(Constructor->getDeclContext());
10812 return Constructor->setInvalidDecl();
10819 if (!Constructor->isInvalidDecl() &&
10820 Constructor->hasOneParamOrDefaultArgs() &&
10821 Constructor->getTemplateSpecializationKind() !=
10823 QualType ParamType = Constructor->getParamDecl(0)->getType();
10826 SourceLocation ParamLoc = Constructor->getParamDecl(0)->getLocation();
10828 = Constructor->getParamDecl(0)->getIdentifier() ? "const &"
10835 Constructor->setInvalidDecl();
13892 CXXConstructorDecl *Constructor) {
13893 assert((Constructor->isDefaulted() && Constructor->isDefaultConstructor() &&
13894 !Constructor->doesThisDeclarationHaveABody() &&
13895 !Constructor->isDeleted()) &&
13897 if (Constructor->willHaveBody() || Constructor->isInvalidDecl())
13900 CXXRecordDecl *ClassDecl = Constructor->getParent();
13906 SynthesizedFunctionScope Scope(*this, Constructor);
13911 Constructor->getType()->castAs<FunctionProtoType>());
13917 if (SetCtorInitializers(Constructor, /*AnyErrors=*/false)) {
13918 Constructor->setInvalidDecl();
13922 SourceLocation Loc = Constructor->getEndLoc().isValid()
13923 ? Constructor->getEndLoc()
13924 : Constructor->getLocation();
13925 Constructor->setBody(new (Context) CompoundStmt(Loc));
13926 Constructor->markUsed(Context);
13929 L->CompletedImplicitDefinition(Constructor);
13932 DiagnoseUninitializedFields(*this, Constructor);
14036 CXXConstructorDecl *Constructor) {
14037 CXXRecordDecl *ClassDecl = Constructor->getParent();
14038 assert(Constructor->getInheritedConstructor() &&
14039 !Constructor->doesThisDeclarationHaveABody() &&
14040 !Constructor->isDeleted());
14041 if (Constructor->willHaveBody() || Constructor->isInvalidDecl())
14046 SynthesizedFunctionScope Scope(*this, Constructor);
14051 Constructor->getType()->castAs<FunctionProtoType>());
14058 Constructor->getInheritedConstructor().getShadowDecl();
14060 Constructor->getInheritedConstructor().getConstructor();
14101 if (SetCtorInitializers(Constructor, /*AnyErrors*/false, Inits)) {
14102 Constructor->setInvalidDecl();
14106 Constructor->setBody(new (Context) CompoundStmt(InitLoc));
14107 Constructor->markUsed(Context);
14110 L->CompletedImplicitDefinition(Constructor);
14113 DiagnoseUninitializedFields(*this, Constructor);
15918 CXXConstructorDecl *Constructor, MultiExprArg ExprArgs,
15934 if (ConstructKind == CXXConstructionKind::Complete && Constructor &&
15940 Constructor->isCopyOrMoveConstructor() && hasOneRealArgument(ExprArgs)) {
15951 FoundDecl, Constructor,
15960 CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg ExprArgs,
15965 Constructor = findInheritingConstructor(ConstructLoc, Constructor, Shadow);
15969 if (DiagnoseUseOfOverloadedDecl(Constructor, ConstructLoc))
15974 ConstructLoc, DeclInitType, Constructor, Elidable, ExprArgs,
15983 CXXConstructorDecl *Constructor, bool Elidable, MultiExprArg ExprArgs,
15988 Constructor->getParent(),
15991 MarkFunctionReferenced(ConstructLoc, Constructor);
15992 if (getLangOpts().CUDA && !CUDA().CheckCall(ConstructLoc, Constructor))
15997 Context, DeclInitType, ConstructLoc, Constructor, Elidable, ExprArgs,
16001 Constructor);
16067 bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor,
16077 const auto *Proto = Constructor->getType()->castAs<FunctionProtoType>();
16090 Loc, Constructor, Proto, 0, llvm::ArrayRef(Args, NumArgs), AllArgs,
16094 DiagnoseSentinelCalls(Constructor, Loc, AllArgs);
16096 CheckConstructorCall(Constructor, DeclInitType,