Home | History | Annotate | Download | only in Sema

Lines Matching refs:Constructor

380   // libstdc++4.6 marks the vector default constructor as explicit in
505 // Empty initialization requires a constructor call, so
506 // extend the initializer list to include the constructor
620 // Empty initialization requires a constructor call, so
621 // extend the initializer list to include the constructor
2941 ::AddConstructorInitializationStep(CXXConstructorDecl *Constructor,
2951 S.Function.Function = Constructor;
2952 S.Function.FoundDecl = DeclAccessPair::make(Constructor, Access);
3094 /// \brief When initializing from init list via constructor, handle
3143 // Find the constructor (which may be a template).
3144 CXXConstructorDecl *Constructor = nullptr;
3147 Constructor = cast<CXXConstructorDecl>(
3150 Constructor = cast<CXXConstructorDecl>(D);
3153 // However, when considering the argument of a constructor or
3161 // constructor of X, or
3166 Constructor->isCopyOrMoveConstructor())
3170 if (!Constructor->isInvalidDecl() &&
3171 (AllowExplicit || !Constructor->isExplicit()) &&
3172 (!OnlyListConstructors || S.isInitListConstructor(Constructor))) {
3180 // of a constructor that takes a reference to possibly cv-qualified
3186 Constructor->isCopyOrMoveConstructor();
3187 S.AddOverloadCandidate(Constructor, FoundDecl, Args, CandidateSet,
3199 /// \brief Attempt initialization by constructor (C++ [dcl.init]), which
3220 assert(DestRecordType && "Constructor initialization requires record type");
3248 // resolution selects the constructor in two phases:
3256 // If the initializer list has no elements and T has a default constructor,
3270 // - If no viable initializer-list constructor is found, overload resolution
3293 // user-provided default constructor.
3302 // In copy-list-initialization, if an explicit constructor is chosen, the
3310 // Add the constructor initialization step. Any cv-qualification conversion is
3460 // class type with a default constructor, the object is
3577 // Find the constructor (which may be a template).
3578 CXXConstructorDecl *Constructor = nullptr;
3581 Constructor = cast<CXXConstructorDecl>(
3584 Constructor = cast<CXXConstructorDecl>(D);
3586 if (!Constructor->isInvalidDecl() &&
3587 Constructor->isConvertingConstructor(AllowExplicit)) {
3594 S.AddOverloadCandidate(Constructor, FoundDecl,
3922 // presence of a suitable copy constructor:
3924 // The constructor that would be used to make the copy shall
4069 // -- if T is a class type (clause 9) with a user-declared constructor
4070 // (12.1), then the default constructor for T is called (and the
4072 // constructor);
4077 // -- if T is a class type (clause 9) with either no default constructor
4078 // (12.1 [class.ctor]) or a default constructor that is user-provided
4086 // user-provided or deleted default constructor
4087 // zero-initialized and, if T has a non-trivial default constructor,
4090 // constructor' part was removed by DR1507.
4095 // -- if T is a non-union class type without a user-declared constructor,
4102 // occur recursively there, and the implicit default constructor is
4111 // building the constructor call. This affects the semantics of a few
4112 // things (such as whether an explicit default constructor can be called).
4138 // constructor for T is called (and the initialization is ill-formed if
4139 // T has no accessible default constructor);
4149 // default constructor.
4205 // Find the constructor (which may be a template).
4206 CXXConstructorDecl *Constructor = nullptr;
4210 Constructor = cast<CXXConstructorDecl>(
4213 Constructor = cast<CXXConstructorDecl>(D);
4215 if (!Constructor->isInvalidDecl() &&
4216 Constructor->isConvertingConstructor(AllowExplicit)) {
4223 S.AddOverloadCandidate(Constructor, FoundDecl,
4927 /// \brief Look for copy and move constructors and constructor templates, for
4941 CXXConstructorDecl *Constructor = nullptr;
4943 if ((Constructor = dyn_cast<CXXConstructorDecl>(D))) {
4945 if (!Constructor || Constructor->isInvalidDecl() ||
4946 !Constructor->isCopyOrMoveConstructor() ||
4947 !Constructor->isConvertingConstructor(/*AllowExplicit=*/true))
4951 = DeclAccessPair::make(Constructor, Constructor->getAccess());
4952 S.AddOverloadCandidate(Constructor, FoundDecl,
4957 // Handle constructor templates.
4962 Constructor = cast<CXXConstructorDecl>(
4964 if (!Constructor->isConvertingConstructor(/*AllowExplicit=*/true))
4967 // FIXME: Do we need to limit this to copy-constructor-like
5012 /// constructor.
5046 // copy/move constructor and/or destructor for the object have
5056 // of constructor initialization, while copy elision for exception handlers
5066 // Only consider constructors and constructor templates. Per
5105 CXXConstructorDecl *Constructor = cast<CXXConstructorDecl>(Best->Function);
5109 S.CheckConstructorAccess(Loc, Constructor, Entity,
5121 // the selected copy constructor, as if we were going to create a
5122 // proper call to the copy constructor.
5123 for (unsigned I = 1, N = Constructor->getNumParams(); I != N; ++I) {
5124 ParmVarDecl *Parm = Constructor->getParamDecl(I);
5132 S.BuildCXXDefaultArgExpr(Loc, Constructor, Parm);
5139 // constructor call (we might have derived-to-base conversions, or
5140 // the copy constructor may have default arguments).
5141 if (S.CompleteConstructorCall(Constructor, CurInitExpr, Loc, ConstructorArgs))
5144 // Actually perform the constructor call.
5145 CurInit = S.BuildCXXConstructExpr(Loc, T, Constructor, Elidable,
5236 /// Returns true if the parameters describe a constructor initialization of
5273 CXXConstructorDecl *Constructor
5277 // Build a call to the selected constructor.
5284 // Force even a trivial, implicit default constructor to be
5287 assert(Constructor->getParent() && "No parent class for constructor.");
5288 if (Constructor->isDefaulted() && Constructor->isDefaultConstructor() &&
5289 Constructor->isTrivial() && !Constructor->isUsed(false))
5290 S.DefineImplicitDefaultConstructor(Loc, Constructor);
5297 // of a constructor that takes a reference to possibly cv-qualified
5303 Constructor->isCopyOrMoveConstructor();
5305 // Determine the arguments required to actually perform the constructor
5307 if (S.CompleteConstructorCall(Constructor, Args,
5316 S.MarkFunctionReferenced(Loc, Constructor);
5317 if (S.DiagnoseUseOfDecl(Constructor, Loc))
5329 S.Context, Constructor, TSInfo, ConstructorArgs, ParenOrBraceRange,
5356 Constructor, /*Elidable=*/true,
5365 Constructor,
5377 S.CheckConstructorAccess(Loc, Constructor, Entity,
5447 // -- A temporary bound to a reference member in a constructor's
5448 // ctor-initializer persists until the constructor exits.
5481 // We can reach this case for aggregate initialization in a constructor:
5613 << /*at end of constructor*/true;
5932 // We have a user-defined conversion that invokes either a constructor
5940 if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(Fn)) {
5941 // Build a call to the selected constructor.
5946 // Determine the arguments required to actually perform the constructor
5949 if (S.CompleteConstructorCall(Constructor,
5955 CurInit = S.BuildCXXConstructExpr(Loc, Step->Type, Constructor,
5965 S.CheckConstructorAccess(Kind.getLocation(), Constructor, Entity,
5971 QualType Class = S.Context.getTypeDeclType(Constructor->getParent());
6180 // the call to the object's constructor within the next step.
6676 // base within a constructor. If no viable function was
6679 CXXConstructorDecl *Constructor
6683 << (Constructor->getInheritedConstructor() ? 2 :
6684 Constructor->isImplicit() ? 1 : 0)
6685 << S.Context.getTypeDeclType(Constructor->getParent())
6696 << (Constructor->getInheritedConstructor() ? 2 :
6697 Constructor->isImplicit() ? 1 : 0)
6698 << S.Context.getTypeDeclType(Constructor->getParent())
6754 // a constructor. Complain that it needs to be explicitly
6756 CXXConstructorDecl *Constructor = cast<CXXConstructorDecl>(S.CurContext);
6758 << (Constructor->getInheritedConstructor() ? 2 :
6759 Constructor->isImplicit() ? 1 : 0)
6760 << S.Context.getTypeDeclType(Constructor->getParent())
6900 OS << "constructor overloading failed";
6924 OS << "list constructor overloading failed";
6928 OS << "list copy initialization chose explicit constructor";
7015 OS << "list initialization via constructor";
7027 OS << "constructor initialization";