/llvm-project/polly/lib/External/isl/interface/ |
H A D | generator.h | 38 bool operator()(FunctionDecl *x, FunctionDecl *y) const { in operator() 45 typedef std::set<FunctionDecl *, function_name_less> function_set; 86 set<FunctionDecl *> persistent_callbacks; 87 map<FunctionDecl *, vector<set_enum> > set_enums; 90 FunctionDecl *fn_type; 91 FunctionDecl *fn_to_str; 92 FunctionDecl *fn_copy; 93 FunctionDecl *fn_free; 95 std::map<clang::FunctionDecl *, const isl_class &> copied_from; 96 std::map<clang::FunctionDecl *, int> copy_depth; [all …]
|
H A D | python.h | 14 set<FunctionDecl *> exported_functions, in python_generator() 15 set<FunctionDecl *> functions) : in python_generator() 29 void print_type_checks(const string &cname, FunctionDecl *method, 33 void print_arg_in_call(FunctionDecl *fd, const char *fmt, int arg, 35 void print_argtypes(FunctionDecl *fd); 37 FunctionDecl *method, const char *fmt); 38 void print_restype(FunctionDecl *fd); 40 void print_constructor(const isl_class &clazz, FunctionDecl *method); 49 void print_method_type(FunctionDecl *fd); 51 void print_get_method(const isl_class &clazz, FunctionDecl *fd); [all …]
|
H A D | generator.cc | 51 bool isl_class::first_arg_matches_class(FunctionDecl *method) const in first_arg_matches_class() 73 bool isl_class::is_static(FunctionDecl *method) const in is_static() 84 bool generator::is_static(const isl_class &clazz, FunctionDecl *method) in is_static() 93 bool generator::is_mutator(const isl_class &clazz, FunctionDecl *fd) in is_mutator() 117 FunctionDecl *generator::find_by_name(const string &name, bool required) in find_by_name() 119 map<string, FunctionDecl *>::iterator i; in find_by_name() 145 void generator::extract_automatic_conversion(FunctionDecl *fd) in extract_automatic_conversion() 171 FunctionDecl *fd = *fi; in extract_class_automatic_conversions() 225 void generator::add_type_subclasses(FunctionDecl *fn_type) in add_type_subclasses() 254 FunctionDecl *fd) in add_set_enum() [all …]
|
H A D | cpp.h | 30 Method(const isl_class &clazz, FunctionDecl *fd, 32 Method(const isl_class &clazz, FunctionDecl *fd); 58 FunctionDecl *const fd; 117 EnumMethod(const isl_class &clazz, FunctionDecl *fd, 156 set<FunctionDecl *> exported_functions, 157 set<FunctionDecl *> functions); 194 bool next_variant(FunctionDecl *fd, std::vector<bool> &convert); 195 void print_method_variants(FunctionDecl *fd, const std::string &name); 197 void print_descendent_overloads(FunctionDecl *fd, 203 virtual void print_get_method(FunctionDecl *fd) = 0; [all …]
|
H A D | python.cc | 168 FunctionDecl *method, bool first_is_ctx, int n, in print_type_checks() 296 void python_generator::print_arg_in_call(FunctionDecl *fd, const char *fmt, in print_arg_in_call() 340 const set<FunctionDecl *> &callbacks = clazz.persistent_callbacks; in print_persistent_callback_failure_check() 341 set<FunctionDecl *>::const_iterator in; in print_persistent_callback_failure_check() 390 FunctionDecl *method, const char *fmt) in print_method_return() 445 FunctionDecl *fd) in print_get_method() 468 FunctionDecl *method, const char *fmt, int drop_ctx) in print_method_call() 525 FunctionDecl *method, vector<string> super) in print_method() 600 FunctionDecl *fd, int drop_ctx) in print_argument_checks() 654 FunctionDecl *method) in print_method_overload() [all …]
|
/llvm-project/clang/include/clang/Sema/ |
H A D | SemaCUDA.h | 63 /// A pair of a canonical FunctionDecl and a SourceLocation. When used as the 66 CanonicalDeclPtr<const FunctionDecl> FD; 80 llvm::DenseMap</* Callee = */ CanonicalDeclPtr<const FunctionDecl>, 114 CUDAFunctionTarget IdentifyTarget(const FunctionDecl *D, 153 return IdentifyTarget(dyn_cast<FunctionDecl>(SemaRef.CurContext)); 156 static bool isImplicitHostDeviceFunction(const FunctionDecl *D); 178 CUDAFunctionPreference IdentifyPreference(const FunctionDecl *Caller, in IsAllowedCall() 179 const FunctionDecl *Callee); 186 bool IsAllowedCall(const FunctionDecl *Caller, const FunctionDecl *Calle [all...] |
/llvm-project/clang-tools-extra/clang-tidy/readability/ |
H A D | InconsistentDeclarationParameterNameCheck.cpp | 22 AST_MATCHER(FunctionDecl, hasOtherDeclarations) { in AST_MATCHER() argument 61 const FunctionDecl *ParameterSourceDeclaration, in checkIfFixItHintIsApplicable() 62 const ParmVarDecl *SourceParam, const FunctionDecl *OriginalDeclaration) { in checkIfFixItHintIsApplicable() 82 FunctionDecl::TK_FunctionTemplateSpecialization) in checkIfFixItHintIsApplicable() 99 findDifferingParamsInDeclaration(const FunctionDecl *ParameterSourceDeclaration, in findDifferingParamsInDeclaration() 100 const FunctionDecl *OtherDeclaration, in findDifferingParamsInDeclaration() 101 const FunctionDecl *OriginalDeclaration, in findDifferingParamsInDeclaration() 136 findInconsistentDeclarations(const FunctionDecl *OriginalDeclaration, in findInconsistentDeclarations() 137 const FunctionDecl *ParameterSourceDeclaration, in findInconsistentDeclarations() 143 for (const FunctionDecl *OtherDeclaration : OriginalDeclaration->redecls()) { in findInconsistentDeclarations() [all …]
|
/llvm-project/clang/test/SemaHLSL/ |
H A D | entry_shader_redecl.hlsl | 8 // CHECK-ENV: FunctionDecl [[PROTO:0x[0-9a-f]+]] {{.*}} [[SHADERFN]] 'void ()' 9 // CHECK-ENV: FunctionDecl 0x{{.*}} prev [[PROTO]] {{.*}} [[SHADERFN]] 'void ()' 20 // CHECK-LIB: FunctionDecl [[PROTO:0x[0-9a-f]+]] {{.*}} s1 'void ()' 21 // CHECK-LIB: FunctionDecl 0x{{.*}} prev [[PROTO]] {{.*}} s1 'void ()' 28 // CHECK-LIB: FunctionDecl [[PROTO:0x[0-9a-f]+]] {{.*}} s2 'void ()' 29 // CHECK-LIB: FunctionDecl 0x{{.*}} prev [[PROTO]] {{.*}} s2 'void ()' 36 // CHECK-LIB: FunctionDecl [[PROTO:0x[0-9a-f]+]] {{.*}} s3 'void ()' 37 // CHECK-LIB: FunctionDecl 0x{{.*}} prev [[PROTO]] {{.*}} s3 'void ()' 44 // CHECK-LIB: FunctionDecl [[PROTO:0x[0-9a-f]+]] {{.*}} s4 'void ()' 45 // CHECK-LIB: FunctionDecl 0x{{.*}} prev [[PROTO]] {{.*}} s4 'void ()' [all …]
|
H A D | parameter_modifiers_ast.hlsl | 3 // CHECK: FunctionDecl {{.*}} fn 'void (float)' 8 // CHECK: FunctionDecl {{.*}}6 fn2 'void (float)' 14 // CHECK: FunctionDecl {{.*}} fn3 'void (out float)' 20 // CHECK: FunctionDecl {{.*}} fn4 'void (inout float)' 26 // CHECK: FunctionDecl {{.*}} fn5 'void (inout float)' 32 // CHECK: FunctionDecl {{.*}} fn6 'void (inout float)' 40 // CHECK-NEXT: FunctionDecl {{.*}} fn7 'void (inout T)' 43 // CHECK-NEXT: FunctionDecl [[Instantiation:0x[0-9a-fA-F]+]] {{.*}} used fn7 'void (inout float)' implicit_instantiation 52 // CHECK: FunctionDecl {{.*}} fn8 'void ()'
|
H A D | VectorElementOverloadResolution.hlsl | 18 // CHECK: FunctionDecl {{.*}} used HalfFloatDouble 'void (double2)' 19 // CHECK: FunctionDecl {{.*}} used HalfFloatDouble 'void (float2)' 20 // CHECK: FunctionDecl {{.*}} used HalfFloatDouble 'void (half2)' 25 // CHECK: FunctionDecl {{.*}} used FloatDouble 'void (double2)' 26 // CHECK: FunctionDecl {{.*}} used FloatDouble 'void (float2)' 31 // CHECK: FunctionDecl {{.*}} used HalfDouble 'void (double2)' 32 // CHECK: FunctionDecl {{.*}} used HalfDouble 'void (half2)' 37 // CHECK: FunctionDecl {{.*}} used HalfFloat 'void (float2)' 38 // CHECK: FunctionDecl {{.*}} used HalfFloat 'void (half2)' 44 // CHECK: FunctionDecl {{ [all...] |
H A D | ScalarOverloadResolution.hlsl | 18 // CHECK: FunctionDecl {{.*}} used HalfFloatDouble 'void (double)' 19 // CHECK: FunctionDecl {{.*}} used HalfFloatDouble 'void (float)' 20 // CHECK: FunctionDecl {{.*}} used HalfFloatDouble 'void (half)' 25 // CHECK: FunctionDecl {{.*}} used FloatDouble 'void (double)' 26 // CHECK: FunctionDecl {{.*}} used FloatDouble 'void (float)' 31 // CHECK: FunctionDecl {{.*}} used HalfDouble 'void (double)' 32 // CHECK: FunctionDecl {{.*}} used HalfDouble 'void (half)' 37 // CHECK: FunctionDecl {{.*}} used HalfFloat 'void (float)' 38 // CHECK: FunctionDecl {{.*}} used HalfFloat 'void (half)' 44 // CHECK: FunctionDecl {{ [all...] |
/llvm-project/clang/unittests/AST/ |
H A D | DeclTest.cpp | 186 selectFirst<FunctionDecl>("f", match(functionDecl().bind("f"), Ctx)); in TEST() 214 const FunctionDecl *TemplateF = Funcs[0].getNodeAs<FunctionDecl>("f"); in TEST() 215 const FunctionDecl *SpecializedF = Funcs[1].getNodeAs<FunctionDecl>("f"); in TEST() 247 const auto *f = selectFirst<FunctionDecl>( in TEST() 255 const auto *g = selectFirst<FunctionDecl>( in TEST() 275 auto *f = selectFirst<FunctionDecl>( in TEST() 297 auto *foo = selectFirst<FunctionDecl>( in TEST() 304 auto *bar = selectFirst<FunctionDecl>( in TEST() 326 auto *memFn = selectFirst<FunctionDecl>( in TEST() 349 auto *getFooValue = selectFirst<FunctionDecl>( in TEST() [all …]
|
/llvm-project/clang/test/Index/ |
H A D | complete-type-factors.m | 38 // CHECK-CC1: FunctionDecl:{ResultType int}{TypedText func1}{LeftParen (}{Placeholder enum Color}{R… 39 // CHECK-CC1: FunctionDecl:{ResultType enum Priority}{TypedText func2}{LeftParen (}{Placeholder int… 47 // CHECK-CC1: FunctionDecl:{ResultType enum Priority}{TypedText test1}{LeftParen (}{Placeholder enu… 51 // CHECK-CC2: FunctionDecl:{ResultType int}{TypedText func1}{LeftParen (}{Placeholder enum Color}{R… 52 // CHECK-CC2: FunctionDecl:{ResultType enum Priority}{TypedText func2}{LeftParen (}{Placeholder int… 61 // CHECK-CC2: FunctionDecl:{ResultType enum Priority}{TypedText test1}{LeftParen (}{Placeholder enu… 66 // CHECK-CC3: FunctionDecl:{ResultType int}{TypedText func1}{LeftParen (}{Placeholder enum Color}{R… 67 // CHECK-CC3: FunctionDecl:{ResultType enum Priority}{TypedText func2}{LeftParen (}{Placeholder int… 68 // CHECK-CC3: FunctionDecl:{ResultType void}{TypedText func3}{LeftParen (}{Placeholder float}{Right… 77 // CHECK-CC3: FunctionDecl:{ResultType enum Priority}{TypedText test1}{LeftParen (}{Placeholder enu… [all …]
|
/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
H A D | CheckSecuritySyntaxOnly.cpp | 95 bool checkCall_strCommon(const CallExpr *CE, const FunctionDecl *FD); 97 typedef void (WalkAST::*FnCheck)(const CallExpr *, const FunctionDecl *); 102 void checkCall_bcmp(const CallExpr *CE, const FunctionDecl *FD); 103 void checkCall_bcopy(const CallExpr *CE, const FunctionDecl *FD); 104 void checkCall_bzero(const CallExpr *CE, const FunctionDecl *FD); 105 void checkCall_gets(const CallExpr *CE, const FunctionDecl *FD); 106 void checkCall_getpw(const CallExpr *CE, const FunctionDecl *FD); 107 void checkCall_mktemp(const CallExpr *CE, const FunctionDecl *FD); 108 void checkCall_mkstemp(const CallExpr *CE, const FunctionDecl *FD); 109 void checkCall_strcpy(const CallExpr *CE, const FunctionDecl *FD); [all …]
|
/llvm-project/clang/include/clang/AST/ |
H A D | GlobalDecl.h | 71 GlobalDecl(const FunctionDecl *D, unsigned MVIndex = 0) 79 GlobalDecl(const FunctionDecl *D, KernelReferenceKind Kind) in GlobalDecl() 123 assert(isa<FunctionDecl>( in getMultiVersionIndex() 125 !cast<FunctionDecl>(getDecl())->hasAttr<CUDAGlobalAttr>() && in getMultiVersionIndex() 133 assert(((isa<FunctionDecl>(getDecl()) && in getKernelReferenceKind() 134 cast<FunctionDecl>(getDecl())->hasAttr<CUDAGlobalAttr>()) || in getKernelReferenceKind() 162 static KernelReferenceKind getDefaultKernelReference(const FunctionDecl *D) { in getDefaultKernelReference() 188 assert(isa<FunctionDecl>(getDecl()) && in getWithMultiVersionIndex() 189 !cast<FunctionDecl>(getDecl())->hasAttr<CUDAGlobalAttr>() && in getWithMultiVersionIndex() 199 assert(isa<FunctionDecl>(getDecl()) && in getWithKernelReferenceKind() [all …]
|
H A D | ASTMutationListener.h | 26 class FunctionDecl; variable 75 const FunctionDecl *D) {} in AddedCXXTemplateSpecialization() 79 virtual void ResolvedExceptionSpec(const FunctionDecl *FD) {} in ResolvedExceptionSpec() 82 virtual void DeducedReturnType(const FunctionDecl *FD, QualType ReturnType); 86 const FunctionDecl *Delete, in ResolvedOperatorDelete() 90 virtual void CompletedImplicitDefinition(const FunctionDecl *D) {} in CompletedImplicitDefinition() 101 virtual void FunctionDefinitionInstantiated(const FunctionDecl *D) {} in FunctionDefinitionInstantiated()
|
/llvm-project/clang/lib/AST/ |
H A D | Decl.cpp | 306 if (isa<FunctionDecl>(DC) || isa<BlockDecl>(DC)) in getOutermostFuncOrBlockContext() 373 static bool shouldConsiderTemplateVisibility(const FunctionDecl *fn, in shouldConsiderTemplateVisibility() 393 LinkageInfo &LV, const FunctionDecl *fn, in mergeTemplateLV() 552 const auto *FD = dyn_cast<FunctionDecl>(D); in useInlineVisibilityHidden() 565 const FunctionDecl *Def = nullptr; in useInlineVisibilityHidden() 596 if (auto *FD = dyn_cast<FunctionDecl>(D)) in getStorageClass() 679 const auto *Func = dyn_cast<FunctionDecl>(D); in getLVForNamespaceScopeDecl() 798 } else if (const auto *Function = dyn_cast<FunctionDecl>(D)) { in getLVForNamespaceScopeDecl() 1154 if (auto *FD = dyn_cast<FunctionDecl>(this)) in isReserved() 1279 if (const auto *fn = dyn_cast<FunctionDecl>(N in getExplicitVisibilityAux() 3025 FunctionDecl::FunctionDecl(Kind DK, ASTContext &C, DeclContext *DC, FunctionDecl() function in FunctionDecl [all...] |
/llvm-project/clang-tools-extra/clang-tidy/misc/ |
H A D | UnusedParametersCheck.cpp | 27 bool isOverrideMethod(const FunctionDecl *Function) { in isOverrideMethod() 72 const FunctionDecl *Function, unsigned Index) { in removeArgument() 94 getFnCalls(const FunctionDecl *Fn) { in WalkUpFromDeclRefExpr() 99 getOtherRefs(const FunctionDecl *Fn) { in WalkUpFromCallExpr() 106 if (const auto *Fn = dyn_cast<FunctionDecl>(DeclRef->getDecl())) { in WalkUpFromCallExpr() 115 dyn_cast_or_null<FunctionDecl>(Call->getCalleeDecl())) { 132 std::unordered_map<const FunctionDecl *, IndexEntry> Index; in storeOptions() 149 const MatchFinder::MatchResult &Result, const FunctionDecl *Function, in warnOnUnusedParameter() 181 for (const FunctionDecl *FD : Function->redecls()) in check() 192 const auto *Function = Result.Nodes.getNodeAs<FunctionDecl>("functio in check() [all...] |
H A D | NewDeleteOverloadsCheck.cpp | 19 AST_MATCHER(FunctionDecl, isPlacementOverload) { in AST_MATCHER() argument 62 OverloadedOperatorKind getCorrespondingOverload(const FunctionDecl *FD) { in getCorrespondingOverload() 94 bool areCorrespondingOverloads(const FunctionDecl *LHS, in areCorrespondingOverloads() 95 const FunctionDecl *RHS) { in areCorrespondingOverloads() 152 const auto *FD = Result.Nodes.getNodeAs<FunctionDecl>("func"); in check() 164 SmallVector<const FunctionDecl *, 4> Diagnose; in onEndOfTranslationUnit() 172 [&Overload](const FunctionDecl *FD) { in onEndOfTranslationUnit()
|
/llvm-project/clang-tools-extra/clangd/refactor/tweaks/ |
H A D | DefineInline.cpp | 55 std::optional<SourceLocation> getSemicolonForDecl(const FunctionDecl *FD) { in getSemicolonForDecl() 69 const FunctionDecl *getSelectedFunction(const SelectionTree::Node *SelNode) { in getSelectedFunction() 71 if (const FunctionDecl *FD = AstNode.get<FunctionDecl>()) in getSelectedFunction() 76 return P->ASTNode.get<FunctionDecl>(); in getSelectedFunction() 85 const FunctionDecl *Target, const SourceManager &SM) { in checkDeclsAreVisible() 124 llvm::Expected<std::string> qualifyAllDecls(const FunctionDecl *FD, in qualifyAllDecls() 125 const FunctionDecl *Target, in qualifyAllDecls() 223 renameParameters(const FunctionDecl *Dest, const FunctionDecl *Source, in renameParameters() 327 const FunctionDecl *findTarget(const FunctionDecl *FD) { in findTarget() 344 const SourceLocation getBeginLoc(const FunctionDecl *FD) { in getBeginLoc() [all …]
|
/llvm-project/clang/lib/Sema/ |
H A D | SemaCUDA.cpp | 55 FunctionDecl *ConfigDecl = getASTContext().getcudaConfigureCallDecl(); in ActOnExecConfigExpr() 134 CUDAFunctionTarget SemaCUDA::IdentifyTarget(const FunctionDecl *D, 182 if (auto *FD = dyn_cast<FunctionDecl>(Var->getDeclContext())) { in IdentifyTarget() 225 SemaCUDA::IdentifyPreference(const FunctionDecl *Caller, 226 const FunctionDecl *Callee) { 304 template <typename AttrT> static bool hasImplicitAttr(const FunctionDecl *D) { in IdentifyPreference() 312 bool SemaCUDA::isImplicitHostDeviceFunction(const FunctionDecl *D) { in hasImplicitAttr() 319 const FunctionDecl *Caller, 320 SmallVectorImpl<std::pair<DeclAccessPair, FunctionDecl *>> &Matches) { in EraseUnwantedMatches() 324 using Pair = std::pair<DeclAccessPair, FunctionDecl*>; in EraseUnwantedMatches() [all...] |
/llvm-project/clang-tools-extra/clang-tidy/bugprone/ |
H A D | SignalHandlerCheck.cpp | 249 bool isStandardFunction(const FunctionDecl *FD) { in isStandardFunction() 327 AST_MATCHER(FunctionDecl, isStandardFunction) { in AST_MATCHER() argument 380 Result.Nodes.getNodeAs<FunctionDecl>("handler_decl"); in check() 410 const auto *CallF = dyn_cast<FunctionDecl>((*Itr)->getDecl()); in check() 436 const FunctionDecl *FD, const Expr *CallOrRef, in checkFunction() 472 const FunctionDecl *FD, const Expr *CallOrRef, in checkFunctionCPP14() 483 const FunctionDecl *FBody = nullptr; in checkFunctionCPP14() 514 const FunctionDecl *FD) const { in isStandardFunctionAsyncSafe() 549 << cast<FunctionDecl>(Callee->getDecl()) in reportHandlerChain() 550 << cast<FunctionDecl>(Caller->getDecl()); in reportHandlerChain() [all …]
|
/llvm-project/clang-tools-extra/clang-tidy/utils/ |
H A D | ExceptionAnalyzer.h | 19 /// This class analysis if a `FunctionDecl` can in principle throw an 125 ExceptionInfo analyze(const FunctionDecl *Func); 130 throwsException(const FunctionDecl *Func, 132 llvm::SmallSet<const FunctionDecl *, 32> &CallStack); 135 llvm::SmallSet<const FunctionDecl *, 32> &CallStack); 137 ExceptionInfo analyzeImpl(const FunctionDecl *Func); 144 llvm::DenseMap<const FunctionDecl *, ExceptionInfo> FunctionCache{32U};
|
H A D | ExceptionSpecAnalyzer.h | 32 State analyze(const FunctionDecl *FuncDecl); 51 State analyzeImpl(const FunctionDecl *FuncDecl); 69 static State analyzeFunctionEST(const FunctionDecl *FuncDecl, 82 getDefaultableMemberKind(const FunctionDecl *FuncDecl); 84 llvm::DenseMap<const FunctionDecl *, State> FunctionCache{32U};
|
/llvm-project/clang-tools-extra/clang-tidy/performance/ |
H A D | UnnecessaryValueParamCheck.cpp | 33 bool isReferencedOutsideOfCallExpr(const FunctionDecl &Function, in isReferencedOutsideOfCallExpr() 84 const auto *Function = Result.Nodes.getNodeAs<FunctionDecl>("functionDecl"); in check() 141 void UnnecessaryValueParamCheck::handleConstRefFix(const FunctionDecl &Function, in check() 166 for (const auto *FunctionDecl = &Function; FunctionDecl != nullptr; in storeOptions() 167 FunctionDecl = FunctionDecl->getPreviousDecl()) { in storeOptions() 168 const auto &CurrentParam = *FunctionDecl->getParamDecl(Index); in storeOptions() 143 for (const auto *FunctionDecl = Function; FunctionDecl != nullptr; check() local
|