Home | History | Annotate | Download | only in Sema

Lines Matching refs:Destructor

4019   // user might reasonably want to know why the destructor is being
4042 // The destructor for an implicit anonymous union member is never invoked.
4546 // Warn if the class has virtual methods but non-virtual public destructor.
4598 // destructor for the class is trivial.
4843 // A user-provided destructor can be defined outside the class. When that
5178 // As a weird special case, a destructor call from a union's constructor
5180 // destructor is never actually called, but is semantically checked as
5229 // -- any direct or virtual base class [...] has a type with a destructor
5239 // type with a destructor that is deleted or inaccessible
5400 // namespace scope, the constructor and destructor are used.
5454 // -- for a virtual destructor, lookup of the non-array deallocation function
5543 // A destructor is trivial if:
5831 // A [default constructor or destructor] is trivial if
5847 // A [default constructor or destructor] is trivial if
5850 // constructor or destructor]
5855 // A destructor is trivial if [...]
5856 // -- the destructor is not virtual
6060 /// constructor, or destructor, to the given C++ class (C++
6108 // If we have a dynamic class, then the destructor may be virtual, so we
6109 // have to declare the destructor immediately. This ensures that, e.g., it
6365 /// CheckDestructor - Checks a fully-formed destructor definition for
6368 bool Sema::CheckDestructor(CXXDestructorDecl *Destructor) {
6369 CXXRecordDecl *RD = Destructor->getParent();
6371 if (!Destructor->getOperatorDelete() && Destructor->isVirtual()) {
6374 if (!Destructor->isImplicit())
6375 Loc = Destructor->getLocation();
6379 // If we have a virtual destructor, look up the deallocation function
6392 Destructor->setOperatorDelete(OperatorDelete);
6399 /// the well-formednes of the destructor declarator @p D with type @p
6402 /// will be updated to reflect a well-formed type for the destructor and
6409 // be used as the identifier in the declarator for a destructor
6422 // A destructor is used to destroy objects of its class type. A
6423 // destructor takes no parameters, and no return type can be
6424 // specified for it (not even void). The address of a destructor
6425 // shall not be taken. A destructor shall not be static. A
6426 // destructor can be invoked for a const, volatile or const
6427 // volatile object. A destructor shall not be declared const,
6477 // A destructor shall not be declared with a ref-qualifier.
6494 // Make sure the destructor isn't variadic.
8878 // If a class has no user-declared destructor, a destructor is
8879 // declared implicitly. An implicitly-declared destructor is an
8887 // Create the actual destructor declaration.
8894 CXXDestructorDecl *Destructor
8898 Destructor->setAccess(AS_public);
8899 Destructor->setDefaulted();
8900 Destructor->setImplicit();
8902 // Build an exception specification pointing back at this destructor.
8903 FunctionProtoType::ExtProtoInfo EPI = getImplicitMethodEPI(*this, Destructor);
8904 Destructor->setType(Context.getFunctionType(Context.VoidTy, None, EPI));
8906 Destructor);
8910 Destructor->setTrivial(ClassDecl->hasTrivialDestructor());
8912 if (ShouldDeleteSpecialMember(Destructor, CXXDestructor))
8913 SetDeclDeleted(Destructor, ClassLoc);
8915 // Note that we have declared this destructor.
8918 // Introduce this destructor into its scope.
8920 PushOnScopeChains(Destructor, S, false);
8921 ClassDecl->addDecl(Destructor);
8923 return Destructor;
8927 CXXDestructorDecl *Destructor) {
8928 assert((Destructor->isDefaulted() &&
8929 !Destructor->doesThisDeclarationHaveABody() &&
8930 !Destructor->isDeleted()) &&
8932 CXXRecordDecl *ClassDecl = Destructor->getParent();
8933 assert(ClassDecl && "DefineImplicitDestructor - invalid destructor");
8935 if (Destructor->isInvalidDecl())
8938 SynthesizedFunctionScope Scope(*this, Destructor);
8941 MarkBaseAndMemberDestructorsReferenced(Destructor->getLocation(),
8942 Destructor->getParent());
8944 if (CheckDestructor(Destructor) || Trap.hasErrorOccurred()) {
8948 Destructor->setInvalidDecl();
8952 SourceLocation Loc = Destructor->getLocEnd().isValid()
8953 ? Destructor->getLocEnd()
8954 : Destructor->getLocation();
8955 Destructor->setBody(new (Context) CompoundStmt(Loc));
8956 Destructor->markUsed(Context);
8960 L->CompletedImplicitDefinition(Destructor);
8978 CXXDestructorDecl *Destructor) {
8983 // A declaration of a destructor that does not have an exception-
8986 const FunctionProtoType *DtorType = Destructor->getType()->
8991 // Replace the destructor's type, building off the existing one. Fortunately,
8992 // the only thing of interest in the destructor type is its extended info.
8996 EPI.ExceptionSpecDecl = Destructor;
8997 Destructor->setType(Context.getFunctionType(Context.VoidTy, None, EPI));
8999 // FIXME: If the destructor has a body that could throw, and the newly created
9556 /// copy assignment operator, or destructor.
9596 << /*destructor*/isa<CXXDestructorDecl>(UserDeclaredOperation);
9623 // user-declared destructor.
10365 // or a user-declared destructor.
10720 // copy/move constructor and/or destructor for the object have
10766 CXXDestructorDecl *Destructor = LookupDestructor(ClassDecl);
10767 MarkFunctionReferenced(VD->getLocation(), Destructor);
10768 CheckDestructorAccess(VD->getLocation(), Destructor,
10772 DiagnoseUseOfDecl(Destructor, VD->getLocation());
10774 if (Destructor->isTrivial()) return;
12541 // The Microsoft ABI requires that we perform the destructor body
12543 // the deleting destructor is emitted with the vtable, not with the
12544 // destructor definition as in the Itanium ABI.
12732 // Be sure that the destructor is accessible and is marked as referenced.
12737 if (CXXDestructorDecl *Destructor = LookupDestructor(RD)) {
12738 MarkFunctionReferenced(Field->getLocation(), Destructor);
12739 CheckDestructorAccess(Field->getLocation(), Destructor,