Lines Matching refs:Destructor
5945 bool Sema::CheckDestructor(CXXDestructorDecl *Destructor) {
5946 CXXRecordDecl *RD = Destructor->getParent();
5948 if (!Destructor->getOperatorDelete() && Destructor->isVirtual()) {
5951 if (!Destructor->isImplicit())
5952 Loc = Destructor->getLocation();
5965 Destructor->setOperatorDelete(OperatorDelete);
8365 CXXDestructorDecl *Destructor
8369 Destructor->setAccess(AS_public);
8370 Destructor->setDefaulted();
8371 Destructor->setImplicit();
8376 EPI.ExceptionSpecDecl = Destructor;
8377 Destructor->setType(Context.getFunctionType(Context.VoidTy, None, EPI));
8379 AddOverriddenMethods(ClassDecl, Destructor);
8383 Destructor->setTrivial(ClassDecl->hasTrivialDestructor());
8385 if (ShouldDeleteSpecialMember(Destructor, CXXDestructor))
8386 SetDeclDeleted(Destructor, ClassLoc);
8393 PushOnScopeChains(Destructor, S, false);
8394 ClassDecl->addDecl(Destructor);
8396 return Destructor;
8400 CXXDestructorDecl *Destructor) {
8401 assert((Destructor->isDefaulted() &&
8402 !Destructor->doesThisDeclarationHaveABody() &&
8403 !Destructor->isDeleted()) &&
8405 CXXRecordDecl *ClassDecl = Destructor->getParent();
8408 if (Destructor->isInvalidDecl())
8411 SynthesizedFunctionScope Scope(*this, Destructor);
8414 MarkBaseAndMemberDestructorsReferenced(Destructor->getLocation(),
8415 Destructor->getParent());
8417 if (CheckDestructor(Destructor) || Trap.hasErrorOccurred()) {
8421 Destructor->setInvalidDecl();
8425 SourceLocation Loc = Destructor->getLocation();
8426 Destructor->setBody(new (Context) CompoundStmt(Loc));
8427 Destructor->setUsed();
8431 L->CompletedImplicitDefinition(Destructor);
8461 CXXDestructorDecl *Destructor) {
8469 const FunctionProtoType *DtorType = Destructor->getType()->
8479 EPI.ExceptionSpecDecl = Destructor;
8480 Destructor->setType(Context.getFunctionType(Context.VoidTy, None, EPI));
10204 CXXDestructorDecl *Destructor = LookupDestructor(ClassDecl);
10205 MarkFunctionReferenced(VD->getLocation(), Destructor);
10206 CheckDestructorAccess(VD->getLocation(), Destructor,
10210 DiagnoseUseOfDecl(Destructor, VD->getLocation());
12093 if (CXXDestructorDecl *Destructor = LookupDestructor(RD)) {
12094 MarkFunctionReferenced(Field->getLocation(), Destructor);
12095 CheckDestructorAccess(Field->getLocation(), Destructor,