Lines Matching refs:Dcl
1781 static bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl,
1784 static bool CheckConstexprMissingReturn(Sema &SemaRef, const FunctionDecl *Dcl);
1876 static bool CheckConstexprDeclStmt(Sema &SemaRef, const FunctionDecl *Dcl, in CheckConstexprDeclStmt() argument
1908 << isa<CXXConstructorDecl>(Dcl); in CheckConstexprDeclStmt()
1924 << isa<CXXConstructorDecl>(Dcl); in CheckConstexprDeclStmt()
1952 << isa<CXXConstructorDecl>(Dcl) in CheckConstexprDeclStmt()
1961 isa<CXXConstructorDecl>(Dcl), in CheckConstexprDeclStmt()
1966 isa<CXXConstructorDecl>(Dcl))) { in CheckConstexprDeclStmt()
1977 << isa<CXXConstructorDecl>(Dcl); in CheckConstexprDeclStmt()
1989 << isa<CXXConstructorDecl>(Dcl); in CheckConstexprDeclStmt()
2007 << isa<CXXConstructorDecl>(Dcl) << Dcl->isConsteval(); in CheckConstexprDeclStmt()
2030 const FunctionDecl *Dcl, in CheckConstexprCtorInitializer() argument
2058 SemaRef.Diag(Dcl->getLocation(), in CheckConstexprCtorInitializer()
2075 if (!CheckConstexprCtorInitializer(SemaRef, Dcl, I, Inits, Diagnosed, in CheckConstexprCtorInitializer()
2085 CheckConstexprFunctionStmt(Sema &SemaRef, const FunctionDecl *Dcl, Stmt *S, in CheckConstexprFunctionStmt() argument
2102 if (!CheckConstexprDeclStmt(SemaRef, Dcl, cast<DeclStmt>(S), Cxx1yLoc, Kind)) in CheckConstexprFunctionStmt()
2108 if (isa<CXXConstructorDecl>(Dcl)) { in CheckConstexprFunctionStmt()
2122 SemaRef, Dcl, cast<AttributedStmt>(S)->getSubStmt(), ReturnStmts, in CheckConstexprFunctionStmt()
2132 if (!CheckConstexprFunctionStmt(SemaRef, Dcl, BodyIt, ReturnStmts, in CheckConstexprFunctionStmt()
2145 if (!CheckConstexprFunctionStmt(SemaRef, Dcl, If->getThen(), ReturnStmts, in CheckConstexprFunctionStmt()
2149 !CheckConstexprFunctionStmt(SemaRef, Dcl, If->getElse(), ReturnStmts, in CheckConstexprFunctionStmt()
2168 !CheckConstexprFunctionStmt(SemaRef, Dcl, SubStmt, ReturnStmts, in CheckConstexprFunctionStmt()
2184 !CheckConstexprFunctionStmt(SemaRef, Dcl, SubStmt, ReturnStmts, in CheckConstexprFunctionStmt()
2196 !CheckConstexprFunctionStmt(SemaRef, Dcl, SubStmt, ReturnStmts, in CheckConstexprFunctionStmt()
2210 !CheckConstexprFunctionStmt(SemaRef, Dcl, SubStmt, ReturnStmts, in CheckConstexprFunctionStmt()
2220 SemaRef, Dcl, cast<CXXCatchStmt>(S)->getHandlerBlock(), ReturnStmts, in CheckConstexprFunctionStmt()
2237 << isa<CXXConstructorDecl>(Dcl) << Dcl->isConsteval(); in CheckConstexprFunctionStmt()
2247 static bool CheckConstexprFunctionBody(Sema &SemaRef, const FunctionDecl *Dcl, in CheckConstexprFunctionBody() argument
2276 << isa<CXXConstructorDecl>(Dcl); in CheckConstexprFunctionBody()
2289 !CheckConstexprFunctionStmt(SemaRef, Dcl, SubStmt, ReturnStmts, in CheckConstexprFunctionBody()
2306 << isa<CXXConstructorDecl>(Dcl); in CheckConstexprFunctionBody()
2312 << isa<CXXConstructorDecl>(Dcl); in CheckConstexprFunctionBody()
2318 << isa<CXXConstructorDecl>(Dcl); in CheckConstexprFunctionBody()
2322 = dyn_cast<CXXConstructorDecl>(Dcl)) { in CheckConstexprFunctionBody()
2335 Dcl->getLocation(), in CheckConstexprFunctionBody()
2377 if (!CheckConstexprCtorInitializer(SemaRef, Dcl, I, Inits, Diagnosed, in CheckConstexprFunctionBody()
2386 if (!CheckConstexprMissingReturn(SemaRef, Dcl)) in CheckConstexprFunctionBody()
2437 SemaRef.getSourceManager().isInSystemHeader(Dcl->getLocation()) || in CheckConstexprFunctionBody()
2439 diag::ext_constexpr_function_never_constant_expr, Dcl->getLocation()); in CheckConstexprFunctionBody()
2442 !Expr::isPotentialConstantExpr(Dcl, Diags)) { in CheckConstexprFunctionBody()
2443 SemaRef.Diag(Dcl->getLocation(), in CheckConstexprFunctionBody()
2445 << isa<CXXConstructorDecl>(Dcl) << Dcl->isConsteval() in CheckConstexprFunctionBody()
2446 << Dcl->getNameInfo().getSourceRange(); in CheckConstexprFunctionBody()
2457 const FunctionDecl *Dcl) { in CheckConstexprMissingReturn() argument
2458 bool IsVoidOrDependentType = Dcl->getReturnType()->isVoidType() || in CheckConstexprMissingReturn()
2459 Dcl->getReturnType()->isDependentType(); in CheckConstexprMissingReturn()
2471 SemaRef.Diag(Dcl->getLocation(), in CheckConstexprMissingReturn()
2474 << Dcl->isConsteval(); in CheckConstexprMissingReturn()
11698 void Sema::ActOnFinishNamespaceDef(Decl *Dcl, SourceLocation RBrace) { in ActOnFinishNamespaceDef() argument
11699 NamespaceDecl *Namespc = dyn_cast_or_null<NamespaceDecl>(Dcl); in ActOnFinishNamespaceDef()
11707 Dcl->setModuleOwnershipKind(Decl::ModuleOwnershipKind::VisibleWhenImported); in ActOnFinishNamespaceDef()
17920 void Sema::SetDeclDeleted(Decl *Dcl, SourceLocation DelLoc, in SetDeclDeleted() argument
17922 AdjustDeclIfTemplate(Dcl); in SetDeclDeleted()
17924 FunctionDecl *Fn = dyn_cast_or_null<FunctionDecl>(Dcl); in SetDeclDeleted()
17973 void Sema::SetDeclDefaulted(Decl *Dcl, SourceLocation DefaultLoc) { in SetDeclDefaulted() argument
17974 if (!Dcl || Dcl->isInvalidDecl()) in SetDeclDefaulted()
17977 auto *FD = dyn_cast<FunctionDecl>(Dcl); in SetDeclDefaulted()
17979 if (auto *FTD = dyn_cast<FunctionTemplateDecl>(Dcl)) { in SetDeclDefaulted()
18397 Decl *Dcl = ActOnDeclarator(S, D); in ActOnCXXConditionDeclaration() local
18398 if (!Dcl) in ActOnCXXConditionDeclaration()
18401 if (isa<FunctionDecl>(Dcl)) { // The declarator shall not specify a function. in ActOnCXXConditionDeclaration()
18402 Diag(Dcl->getLocation(), diag::err_invalid_use_of_function_type) in ActOnCXXConditionDeclaration()
18407 if (auto *VD = dyn_cast<VarDecl>(Dcl)) in ActOnCXXConditionDeclaration()
18410 return Dcl; in ActOnCXXConditionDeclaration()