• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/clang/lib/Sema/

Lines Matching refs:Destructor

10221 bool Sema::CheckDestructor(CXXDestructorDecl *Destructor) {
10222 CXXRecordDecl *RD = Destructor->getParent();
10224 if (!Destructor->getOperatorDelete() && Destructor->isVirtual()) {
10227 if (!Destructor->isImplicit())
10228 Loc = Destructor->getLocation();
10246 ContextRAII SwitchContext(*this, Destructor);
10263 Destructor->setOperatorDelete(OperatorDelete, ThisArg);
13213 CXXDestructorDecl *Destructor =
13218 Destructor->setAccess(AS_public);
13219 Destructor->setDefaulted();
13223 Destructor,
13228 setupImplicitSpecialMemberType(Destructor, Context.VoidTy, None);
13232 Destructor->setTrivial(ClassDecl->hasTrivialDestructor());
13233 Destructor->setTrivialForCall(ClassDecl->hasAttr<TrivialABIAttr>() ||
13240 CheckImplicitSpecialMemberDeclaration(S, Destructor);
13246 ShouldDeleteSpecialMember(Destructor, CXXDestructor))
13247 SetDeclDeleted(Destructor, ClassLoc);
13251 PushOnScopeChains(Destructor, S, false);
13252 ClassDecl->addDecl(Destructor);
13254 return Destructor;
13258 CXXDestructorDecl *Destructor) {
13259 assert((Destructor->isDefaulted() &&
13260 !Destructor->doesThisDeclarationHaveABody() &&
13261 !Destructor->isDeleted()) &&
13263 if (Destructor->willHaveBody() || Destructor->isInvalidDecl())
13266 CXXRecordDecl *ClassDecl = Destructor->getParent();
13269 SynthesizedFunctionScope Scope(*this, Destructor);
13274 Destructor->getType()->castAs<FunctionProtoType>());
13280 MarkBaseAndMemberDestructorsReferenced(Destructor->getLocation(),
13281 Destructor->getParent());
13283 if (CheckDestructor(Destructor)) {
13284 Destructor->setInvalidDecl();
13288 SourceLocation Loc = Destructor->getEndLoc().isValid()
13289 ? Destructor->getEndLoc()
13290 : Destructor->getLocation();
13291 Destructor->setBody(new (Context) CompoundStmt(Loc));
13292 Destructor->markUsed(Context);
13295 L->CompletedImplicitDefinition(Destructor);
13300 CXXDestructorDecl *Destructor) {
13301 if (Destructor->isInvalidDecl())
13304 CXXRecordDecl *ClassDecl = Destructor->getParent();
13310 SynthesizedFunctionScope Scope(*this, Destructor);
13315 MarkVirtualBaseDestructorsReferenced(Destructor->getLocation(), ClassDecl);
13362 void Sema::AdjustDestructorExceptionSpec(CXXDestructorDecl *Destructor) {
13366 if (Destructor->isDependentContext())
13373 const auto *DtorType = Destructor->getType()->castAs<FunctionProtoType>();
13382 EPI.ExceptionSpec.SourceDecl = Destructor;
13383 Destructor->setType(Context.getFunctionType(Context.VoidTy, None, EPI));
15103 CXXDestructorDecl *Destructor = LookupDestructor(ClassDecl);
15109 MarkFunctionReferenced(VD->getLocation(), Destructor);
15110 CheckDestructorAccess(VD->getLocation(), Destructor,
15113 DiagnoseUseOfDecl(Destructor, VD->getLocation());
15116 if (Destructor->isTrivial()) return;
15120 if (Destructor->isConstexpr()) {
17339 if (CXXDestructorDecl *Destructor = LookupDestructor(RD)) {
17340 MarkFunctionReferenced(Field->getLocation(), Destructor);
17341 CheckDestructorAccess(Field->getLocation(), Destructor,