Home
last modified time | relevance | path

Searched refs:FuncDecl (Results 1 – 18 of 18) sorted by relevance

/llvm-project-15.0.7/clang-tools-extra/clang-tidy/cert/
H A DPostfixOperatorCheck.cpp28 const auto *FuncDecl = Result.Nodes.getNodeAs<FunctionDecl>("decl"); in check() local
31 if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(FuncDecl)) in check()
35 if (FuncDecl->getNumParams() != (HasThis ? 1 : 2)) in check()
38 SourceRange ReturnRange = FuncDecl->getReturnTypeSourceRange(); in check()
43 QualType ReturnType = FuncDecl->getReturnType(); in check()
49 << FuncDecl; in check()
76 << FuncDecl; in check()
H A DStrToNumCheck.cpp182 const FunctionDecl *FuncDecl = nullptr; in check() local
188 FuncDecl = ConverterFunc; in check()
219 FuncDecl = FFD; in check()
222 if (!FuncDecl) in check()
228 << FuncDecl << classifyConversionType(Conversion) in check()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/llvmlibc/
H A DCalleeNamespaceCheck.cpp44 const auto *FuncDecl = Result.Nodes.getNodeAs<FunctionDecl>("func"); in check() local
47 if (FuncDecl->getBuiltinID() != 0) in check()
51 const auto *NS = dyn_cast<NamespaceDecl>(getOutermostNamespace(FuncDecl)); in check()
55 const DeclarationName &Name = FuncDecl->getDeclName(); in check()
62 << FuncDecl; in check()
64 diag(FuncDecl->getLocation(), "resolves to this declaration", in check()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DUncheckedOptionalAccessCheck.cpp41 analyzeFunction(const FunctionDecl &FuncDecl, ASTContext &ASTCtx) { in analyzeFunction() argument
47 ControlFlowContext::build(&FuncDecl, FuncDecl.getBody(), &ASTCtx); in analyzeFunction()
53 dataflow::Environment Env(AnalysisContext, FuncDecl); in analyzeFunction()
96 const auto *FuncDecl = Result.Nodes.getNodeAs<FunctionDecl>(FuncID); in check() local
97 if (FuncDecl->isTemplated()) in check()
101 analyzeFunction(*FuncDecl, *Result.Context)) in check()
H A DAssertSideEffectCheck.cpp60 if (const auto *FuncDecl = CExpr->getDirectCallee()) { in AST_MATCHER_P2() local
61 if (FuncDecl->getDeclName().isIdentifier() && in AST_MATCHER_P2()
62 IgnoredFunctionsMatcher.matches(*FuncDecl, Finder, in AST_MATCHER_P2()
65 else if (const auto *MethodDecl = dyn_cast<CXXMethodDecl>(FuncDecl)) in AST_MATCHER_P2()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DFuchsiaHandleChecker.cpp320 if (!FuncDecl) { in checkPreCall()
332 if (Arg >= FuncDecl->getNumParams()) in checkPreCall()
334 const ParmVarDecl *PVD = FuncDecl->getParamDecl(Arg); in checkPreCall()
363 if (!FuncDecl) in checkPostCall()
379 if (hasFuchsiaAttr<AcquireHandleAttr>(FuncDecl)) { in checkPostCall()
386 OS << "Function '" << FuncDecl->getDeclName() in checkPostCall()
402 OS << "Function '" << FuncDecl->getDeclName() in checkPostCall()
412 if (Arg >= FuncDecl->getNumParams()) in checkPostCall()
571 const FunctionDecl *FuncDecl = in checkPointerEscape() local
576 if (FuncDecl && in checkPointerEscape()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/abseil/
H A DDurationSubtractionCheck.cpp34 const auto *FuncDecl = Result.Nodes.getNodeAs<FunctionDecl>("function_decl"); in check() local
41 getScaleForDurationInverse(FuncDecl->getName()); in check()
53 (llvm::Twine("absl::") + FuncDecl->getName() + "(" + in check()
H A DDurationConversionCastCheck.cpp43 const auto *FuncDecl = Result.Nodes.getNodeAs<FunctionDecl>("func_decl"); in check() local
45 StringRef ConversionFuncName = FuncDecl->getName(); in check()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/
H A DUseNoexceptCheck.cpp59 if (const auto *FuncDecl = Result.Nodes.getNodeAs<FunctionDecl>("funcDecl")) { in check() local
61 FnTy = FuncDecl->getType()->getAs<FunctionProtoType>(); in check()
62 if (const auto *TSI = FuncDecl->getTypeSourceInfo()) in check()
/llvm-project-15.0.7/clang/lib/Analysis/FlowSensitive/
H A DDataflowEnvironment.cpp172 if (const auto *FuncDecl = dyn_cast<FunctionDecl>(&DeclCtx)) { in Environment() local
173 assert(FuncDecl->getBody() != nullptr); in Environment()
174 initGlobalVars(*FuncDecl->getBody(), *this); in Environment()
175 for (const auto *ParamDecl : FuncDecl->parameters()) { in Environment()
214 const auto *FuncDecl = Call->getDirectCallee(); in pushCall() local
215 assert(FuncDecl != nullptr); in pushCall()
216 assert(FuncDecl->getBody() != nullptr); in pushCall()
220 auto ParamIt = FuncDecl->param_begin(); in pushCall()
227 assert(ParamIt != FuncDecl->param_end()); in pushCall()
/llvm-project-15.0.7/clang/lib/ARCMigrate/
H A DObjCMT.cpp69 const FunctionDecl *FuncDecl, bool ResultAnnotated);
1432 if (const FunctionDecl *FuncDecl = dyn_cast<FunctionDecl>(Decl)) { in migrateCFAnnotation() local
1477 commit.insertAfterToken(FuncDecl->getEndLoc(), AnnotationString); in AddCFAnnotations()
1482 for (FunctionDecl::param_const_iterator pi = FuncDecl->param_begin(), in AddCFAnnotations()
1483 pe = FuncDecl->param_end(); pi != pe; ++pi, ++i) { in AddCFAnnotations()
1506 if (FuncDecl->hasBody()) in migrateAddFunctionAnnotation()
1510 getSummaryManager(Ctx).getSummary(AnyCall(FuncDecl)); in migrateAddFunctionAnnotation()
1518 if (FuncIsReturnAnnotated && FuncDecl->getNumParams() == 0) in migrateAddFunctionAnnotation()
1527 else if (!AuditedType(FuncDecl->getReturnType())) in migrateAddFunctionAnnotation()
1535 pe = FuncDecl->param_end(); pi != pe; ++pi, ++i) { in migrateAddFunctionAnnotation()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/performance/
H A DUnnecessaryCopyInitialization.cpp210 if (const auto *FuncDecl = Nodes.getNodeAs<FunctionDecl>(FunctionDeclId)) { in constructorArgumentType() local
211 return FuncDecl->getReturnType(); in constructorArgumentType()
/llvm-project-15.0.7/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/
H A Dp3.cpp192 constexpr int FuncDecl() { in FuncDecl() function
/llvm-project-15.0.7/clang/lib/Analysis/
H A DExprMutationAnalyzer.cpp551 const auto FuncDecl = hasDeclaration(functionDecl().bind("func")); in findFunctionArgMutation() local
556 expr(anyOf(callExpr(NonConstRefParam, IsInstantiated, FuncDecl, in findFunctionArgMutation()
560 FuncDecl))) in findFunctionArgMutation()
/llvm-project-15.0.7/clang/lib/Parse/
H A DParser.cpp1308 Decl *FuncDecl = Actions.HandleDeclarator(ParentScope, D, in ParseFunctionDefinition() local
1310 D.complete(FuncDecl); in ParseFunctionDefinition()
1312 if (FuncDecl) { in ParseFunctionDefinition()
1314 StashAwayMethodOrFunctionBodyTokens(FuncDecl); in ParseFunctionDefinition()
1316 return FuncDecl; in ParseFunctionDefinition()
/llvm-project-15.0.7/clang/lib/Sema/
H A DSemaObjCProperty.cpp1543 if (const FunctionDecl *FuncDecl = CXXCE->getDirectCallee()) in ActOnPropertyImplDecl() local
1544 if (!FuncDecl->isTrivial()) in ActOnPropertyImplDecl()
1549 Diag(FuncDecl->getBeginLoc(), diag::note_callee_decl) in ActOnPropertyImplDecl()
1550 << FuncDecl; in ActOnPropertyImplDecl()
H A DSemaDeclAttr.cpp1741 const auto *FuncDecl = cast<FunctionDecl>(D); in AddAllocAlignAttr() local
1742 if (!checkFunctionOrMethodParameterIndex(*this, FuncDecl, TmpAttr, in AddAllocAlignAttr()
1751 << FuncDecl->getParamDecl(Idx.getASTIndex())->getSourceRange(); in AddAllocAlignAttr()
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DCGCall.cpp4605 AbstractAssumeAlignedAttrEmitter(CodeGenFunction &CGF_, const Decl *FuncDecl) in AbstractAssumeAlignedAttrEmitter() argument
4607 if (!FuncDecl) in AbstractAssumeAlignedAttrEmitter()
4609 AA = FuncDecl->getAttr<AlignedAttrTy>(); in AbstractAssumeAlignedAttrEmitter()
4649 AssumeAlignedAttrEmitter(CodeGenFunction &CGF_, const Decl *FuncDecl) in AssumeAlignedAttrEmitter() argument
4650 : AbstractAssumeAlignedAttrEmitter(CGF_, FuncDecl) { in AssumeAlignedAttrEmitter()
4667 AllocAlignAttrEmitter(CodeGenFunction &CGF_, const Decl *FuncDecl, in AllocAlignAttrEmitter() argument
4669 : AbstractAssumeAlignedAttrEmitter(CGF_, FuncDecl) { in AllocAlignAttrEmitter()