Module ASTLanguage.CPredicates
type t= ALVar.formula_id * ALVar.alexp list(name,
param1,...,paramK)
val captured_variables_cxx_ref : Ctl_parser_types.ast_node -> ATDGenerated.Clang_ast_t.named_decl_info listlist of cxx references captured by an ObjC Block
val objc_block_is_capturing_var_of_type : Ctl_parser_types.ast_node -> ALVar.t -> booltrue if the ObjC Block captures a variable of a given type
val objc_block_is_capturing_values : Ctl_parser_types.ast_node -> booltrue if the ObjC Block captures any variables
val call_method : Ctl_parser_types.ast_node -> ALVar.alexp -> boolcall_method an m anis true iff node an is a call to an ObjC method with name containing string m
val call_cxx_method : Ctl_parser_types.ast_node -> ALVar.alexp -> boolcall_cxx_method an m anis true iff node an is a call to a C++ method with name containing string m
val call_class_method : Ctl_parser_types.ast_node -> ALVar.alexp -> boolcall_class_method an mnameis true iff node an is a call to an ObjC class method with name containing mname
val call_instance_method : Ctl_parser_types.ast_node -> ALVar.alexp -> boolcall_instance_method an mnameis true iff node an is a call to an ObjC instance method with name containing mname
val declaration_name : ATDGenerated.Clang_ast_t.decl -> string optiondeclaration_name dreturns the name of declaration d
val is_enum_constant : Ctl_parser_types.ast_node -> ALVar.alexp -> boolis_enum_constant an nameis true iff an is an EnumConstant with name containingname
val is_enum_constant_of_enum : Ctl_parser_types.ast_node -> ALVar.alexp -> boolval is_global_var : Ctl_parser_types.ast_node -> boolis_global_var anis true iff an is a global variable (but not a static local)
val is_static_local_var : Ctl_parser_types.ast_node -> boolis_static_local_var anis true iff an is a static local variable
val is_static_var : Ctl_parser_types.ast_node -> boolis_static_var anis true iff an is a static local variable
val is_extern_var : Ctl_parser_types.ast_node -> boolis_extern_var anis true iff an is a extern variable
val is_const_expr_var : Ctl_parser_types.ast_node -> boolis_const_expr_var anis true iff an is aconstvariable declaration
val is_init_integral_constant_expr : Ctl_parser_types.ast_node -> boolis_init_integra_constant_expr anis true iff it is an initializer and an integral constant expression, or in C++11, whether the initializer is a constant expression.
val is_qual_type_const : Ctl_parser_types.ast_node -> boolis_qual_type_const anis true iff an is a qual_typeconstexpression
val has_init_list_const_expr : Ctl_parser_types.ast_node -> boolhas_init_list_const_expris true iff for an InitListExpr where all subexpressions are const expression
val call_function : Ctl_parser_types.ast_node -> ALVar.alexp -> boolcall_function an nameis true iff an is a call to a function whose name containsname
val call_qualified_function : Ctl_parser_types.ast_node -> ALVar.alexp -> boolcall_function an nameis true iff an is a call to a function whose fully qualified name containsname
val is_strong_property : Ctl_parser_types.ast_node -> boolis_strong_property anis true iff an denotes a objc property declaration withstrongattribute
val is_strong_ivar : Ctl_parser_types.ast_node -> boolis_strong_ivar anis true iff an denotes a objc ivar withstrongattribute
val is_weak_property : Ctl_parser_types.ast_node -> boolis_weak_property anis true iff an denotes a objc property declaration withweakattribute
val is_assign_property : Ctl_parser_types.ast_node -> boolis_assign_property anis true iff an denotes a objc property declaration withassignattribute
val is_property_pointer_type : Ctl_parser_types.ast_node -> boolis_property_pointer_type anis true iff an denotes a objc property declaration with type pointer
val context_in_synchronized_block : CLintersContext.context -> booltrue if the current node is in the context of a synchronized objc block
val is_ivar_atomic : Ctl_parser_types.ast_node -> boolis_ivar_atomic anis true iff an denotes an atomic objc ivar
val is_ivar_readonly : Ctl_parser_types.ast_node -> boolis_ivar_readonly anis true iff an denotes a readonly objc ivar
val is_method_property_accessor_of_ivar : Ctl_parser_types.ast_node -> CLintersContext.context -> boolval is_in_block : CLintersContext.context -> booltrue if the current node is in the context of an objc block
val is_optional_objc_method : Ctl_parser_types.ast_node -> booltrue if the current node is an objc method declaration which is declared with
@optional
val is_call_to_optional_objc_method : Ctl_parser_types.ast_node -> booltrue if the current node is a call to an objc method declaration which is declared with
@optional
val is_in_cxx_constructor : CLintersContext.context -> ALVar.alexp -> boolis_in_cxx_constructor context nameis true if the curent node is within a CXX constructor whose name containsname
val is_in_cxx_destructor : CLintersContext.context -> ALVar.alexp -> boolis_in_destructor_constructor context nameis true if the curent node is within a CXX destructor whose name containsname
val is_in_cxx_method : CLintersContext.context -> ALVar.alexp -> boolis_in_cxx_method context nameis true if the curent node is within a CXX method whose name containsname
val is_in_function : CLintersContext.context -> ALVar.alexp -> boolis_in_function context nameis true if the curent node is within a function whose name containsname
val is_objc_extension : CLintersContext.context -> boolChecks if the current file has an ObjC file extension (I.E.
.mor.mm)
val is_objc_class_named : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCInterfaceDecl or ObjCImplementationDecl node whose name matches the provided REGEXP
Matches on
MyClassin:@interface MyClass @implementation MyClass
val is_objc_interface_named : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCInterfaceDecl node whose name matches the provided REGEXP
Matches on
MyClassin@interface MyClass
val is_objc_implementation_named : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCImplementationDecl node whose name matches the provided REGEXP
Matches on
MyClassin@implementation MyClass
val is_objc_category_named : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCCategoryDecl or ObjCCategoryImplDecl node whose name matches the provided REGEXP
Matches on
MyCategoryin:@interface MyClass (MyCategory) @implementation MyClass (MyCategory)
val is_objc_category_interface_named : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCCategoryDecl node whose name matches the provided REGEXP
Matches on
MyCategoryin@interface MyClass (MyCategory)
val is_objc_category_implementation_named : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCCategoryImplDecl node whose name matches the provided REGEXP
Matches on
MyCategoryin@implementation MyClass (MyCategory)
val is_objc_category_on_class_named : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCCategoryDecl or ObjCCategoryImplDecl node whose class name matches the provided REGEXP
Matches on
MyClassin:@interface MyClass (MyCategory) @implementation MyClass (MyCategory)
val is_objc_category_interface_on_class_named : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCCategoryDecl node whose class name matches the provided REGEXP
Matches on
MyClassin@interface MyClass (MyCategory)
val is_objc_category_implementation_on_class_named : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCCategoryImplDecl node whose class name matches the provided REGEXP
Matches on
MyClassin@implementation MyClass (MyCategory)
val is_objc_category_on_subclass_of : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCCategoryDecl or ObjCCategoryImplDecl node whose class inherits from a class whose name matches the provided REGEXP
val is_objc_category_interface_on_subclass_of : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCCategoryDecl node whose class inherits from a class whose name matches the provided REGEXP
val is_objc_category_implementation_on_subclass_of : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCCategoryImplDecl node whose class inherits from a class whose name matches the provided REGEXP
val adhere_to_protocol : Ctl_parser_types.ast_node -> booltrue if an objC class adhere to a protocol
val is_objc_protocol_named : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCProtocolDecl node whose name matches the provided REGEXP
val is_objc_class_method_named : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCMethodDecl node whose name matches the provided REGEXP and is a class method
val is_objc_instance_method_named : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCMethodDecl node whose name matches the provided REGEXP and is an instance method
val is_objc_method_named : Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCMethodDecl node whose name matches the provided REGEXP
val is_objc_constructor : CLintersContext.context -> boolis_in_objc_constructor contextis true if the curent node is within an ObjC constructor
val objc_class_has_only_one_constructor_method_named : Ctl_parser_types.ast_node -> ALVar.alexp -> booltrue if an ObjC class has only one class method and is a constructor whose name matches the provided REGEXP
val is_objc_dealloc : CLintersContext.context -> boolis_in_objc_dealloc contextis true if the curent node is within an ObjC dealloc method
val is_in_objc_subclass_of : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node is a subnode of an ObjCInterfaceDecl or ObjCImplementationDecl node which inherits from a class whose name matches the provided REGEXP
val is_in_objc_interface_named : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node is a subnode of an ObjCInterfaceDecl node whose name matches the provided REGEXP
val is_in_objc_implementation_named : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node is a subnode of an ObjCImplementationDecl node whose name matches the provided REGEXP
val is_in_objc_class_named : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node is a subnode of an ObjCInterfaceDecl or ObjCImplementationDecl node whose name matches the provided REGEXP
val is_in_objc_category_interface_on_class_named : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node is a subnode of an ObjCCategoryDecl node whose class name matches the provided REGEXP
val is_in_objc_category_implementation_on_class_named : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node is a subnode of an ObjCCategoryImplDecl node whose class name matches the provided REGEXP
val is_in_objc_category_on_class_named : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node is a subnode of an ObjCCategoryDecl or ObjCCategoryImplDecl node whose class name matches the provided REGEXP
val is_in_objc_category_interface_on_subclass_of : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node is a subnode of an ObjCCategoryDecl node whose class inherits from a class whose name matches the provided REGEXP
val is_in_objc_category_implementation_on_subclass_of : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node is a subnode of an ObjCCategoryImplDecl node whose class inherits from a class whose name matches the provided REGEXP
val is_in_objc_category_on_subclass_of : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node is a subnode of an ObjCCategoryDecl or ObjCCategoryImplDecl node whose class inherits from a class whose name matches the provided REGEXP
val is_in_objc_category_interface_named : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node is a subnode of an ObjCCategoryDecl node whose name matches the provided REGEXP
val is_in_objc_category_implementation_named : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node is a subnode of an ObjCCategoryImplDecl node whose name matches the provided REGEXP
val is_in_objc_category_named : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node is a subnode of an ObjCCategoryDecl or ObjCCategoryImplDecl node whose name matches the provided REGEXP
val is_in_objc_protocol_named : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node is a subnode of an ObjCProtocolDecl node whose name matches the provided REGEXP
val is_in_objc_class_method : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node, or a parent node, is an ObjCMethodDecl node whose name matches the provided REGEXP and is a class method
val is_in_objc_instance_method : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node, or a parent node, is an ObjCMethodDecl node whose name matches the provided REGEXP and is an instance method
val is_in_objc_method : CLintersContext.context -> ALVar.alexp -> boolChecks if the current node, or a parent node, is an ObjCMethodDecl node whose name matches the provided REGEXP
val is_objc_method_overriding : Ctl_parser_types.ast_node -> boolChecks if the current node is an ObjCMethodDecl node and is overriding a method in the superclass.
A method is said to override any method in the class base classes, its protocols, or its categories' protocols, that has the same selector and is of the same kind (class or instance). A method in an implementation is not considered as overriding the same method in the interface or its categories.
val is_objc_method_exposed : CLintersContext.context -> Ctl_parser_types.ast_node -> boolChecks if the current node is an ObjCMethodDecl node and is exposed in an interface.
A method is said to be exposed if it's overriding a method or it's declared in a matching interface. For example, a method defined in a class implementation is exposed if it's declared in the class interface or interface extension, but not if it's declared in a category on the class. If the current node is a subnode of an ObjCInterfaceDecl, ObjCCategoryDecl, or ObjCProtocolDecl, this predicate returns false.
val captures_cxx_references : Ctl_parser_types.ast_node -> boolcaptures_cxx_references anis true iff the node an captures some CXX references
val is_binop_with_kind : Ctl_parser_types.ast_node -> ALVar.alexp -> boolis_binop_with_kind an binopis true iff an denotes a binary operator of kind binop
val is_unop_with_kind : Ctl_parser_types.ast_node -> ALVar.alexp -> boolis_unop_of_kind an unopis true iff an denotes a unary operator of kind unop
val has_cast_kind : Ctl_parser_types.ast_node -> ALVar.alexp -> boolhas_cast_kind an castis true iff an denotes a cast operation of kind cast
val isa : Ctl_parser_types.ast_node -> ALVar.alexp -> boolnode an is of class classname
val is_node : Ctl_parser_types.ast_node -> ALVar.alexp -> boolis_node an nodenameis true iff an is a node of kind nodename
val declaration_has_name : Ctl_parser_types.ast_node -> ALVar.alexp -> boolval declaration_ref_name : ?kind:ATDGenerated.Clang_ast_t.decl_kind -> Ctl_parser_types.ast_node -> ALVar.alexp -> booldeclaration_ref_has_name an nis true iff node an is a DeclRefExpr with name containing string n. The optional parameter kind allow to distinguish between special kind of decl_ref_exprs likeis_enum_constant.
val is_class : Ctl_parser_types.ast_node -> ALVar.alexp -> boolval pp_predicate : Stdlib.Format.formatter -> t -> unitval has_type : Ctl_parser_types.ast_node -> ALVar.alexp -> boolval has_value : Ctl_parser_types.ast_node -> ALVar.alexp -> boolval method_return_type : Ctl_parser_types.ast_node -> ALVar.alexp -> boolval has_type_subprotocol_of : Ctl_parser_types.ast_node -> ALVar.alexp -> boolval get_selector : Ctl_parser_types.ast_node -> string optionval within_responds_to_selector_block : CLintersContext.context -> Ctl_parser_types.ast_node -> boolval objc_method_call_within_responds_to_selector_block : CLintersContext.context -> Ctl_parser_types.ast_node -> booltrue if a ObjC method call is withing the scope of a responds_to_selector check
val using_namespace : Ctl_parser_types.ast_node -> ALVar.alexp -> boolval receiver_class_method_call : Ctl_parser_types.ast_node -> ATDGenerated.Clang_ast_t.decl optionval receiver_method_call : Ctl_parser_types.ast_node -> ATDGenerated.Clang_ast_t.decl optionval is_receiver_objc_class_type : Ctl_parser_types.ast_node -> boolChecks if the current node is an ObjCMessageExpr node and has a receiver equivalent to the
Classtype.
val is_receiver_objc_id_type : Ctl_parser_types.ast_node -> boolChecks if the current node is an ObjCMessageExpr node and has a receiver equivalent to the
idtype.
val is_receiver_subclass_of : CLintersContext.context -> Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCMessageExpr node and has a receiver which inherits from a class whose name matches the provided REGEXP.
val is_receiver_class_named : CLintersContext.context -> Ctl_parser_types.ast_node -> ALVar.alexp -> boolChecks if the current node is an ObjCMessageExpr node and has a receiver whose class name matches the provided REGEXP.
val is_receiver_super : Ctl_parser_types.ast_node -> boolChecks if the current node is an ObjCMessageExpr node and has a receiver which is equal to
super.Matches on
super myMethod;
val is_receiver_self : Ctl_parser_types.ast_node -> boolChecks if the current node is an ObjCMessageExpr node and has a receiver which is equal to
self.
val is_at_selector_with_name : Ctl_parser_types.ast_node -> ALVar.alexp -> boolan is an expression
@selectorwith whose name in the language of re
val has_visibility_attribute : Ctl_parser_types.ast_node -> ALVar.alexp -> boolval cxx_construct_expr_has_name : Ctl_parser_types.ast_node -> ALVar.alexp -> booltrue if the node is a CXXConstruct with name matching the provided REGEXP
val has_used_attribute : Ctl_parser_types.ast_node -> boolval has_no_escape_attribute : Ctl_parser_types.ast_node -> boolval within_available_class_block : CLintersContext.context -> Ctl_parser_types.ast_node -> boolval has_type_const_ptr_to_objc_class : Ctl_parser_types.ast_node -> boolval is_decl : Ctl_parser_types.ast_node -> boolis_decl an is true iff an is a node denoting a declaration
val get_ast_node_type_ptr : Ctl_parser_types.ast_node -> ATDGenerated.Clang_ast_t.type_ptr optionval is_method_called_by_superclass : Ctl_parser_types.ast_node -> boolval is_cxx_copy_constructor : Ctl_parser_types.ast_node -> booltrue if the current node is a C++ copy constructor
val has_cxx_fully_qualified_name : Ctl_parser_types.ast_node -> ALVar.alexp -> booltrue iff node has C++ fully qualified name (w/class and namespace) matching the given regexp
val has_cxx_fully_qualified_name_in_custom_symbols : Ctl_parser_types.ast_node -> string -> booltrue iff node has C++ fully qualified name (w/class and namespace) matching a prefix on the given named custom symbol list
val is_in_source_file : Ctl_parser_types.ast_node -> ALVar.alexp -> boolTrue iff the source file path of the given node matches the given regexp or string.
val is_referencing_decl_from_source_file : Ctl_parser_types.ast_node -> ALVar.alexp -> boolTrue iff the given node is a DeclRefExpr referencing a decl whose source file path matches the given regexp or string.
val is_cxx_method_overriding : Ctl_parser_types.ast_node -> ALVar.alexp option -> boolTrue iff the current node is a CXXMethodDecl node and is overriding a method whose fully-qualified name (with class and namespace) matches the given regexp (if given, otherwise any overriding method satisfies).
val is_init_expr_cxx11_constant : Ctl_parser_types.ast_node -> booltrue if the current node is classified as C++11 constant expression by the AST. It works only for VarDecl init expr
val cxx_construct_expr_has_no_parameters : Ctl_parser_types.ast_node -> booltrue if a construct expr has no subexpressions
true is a declaration has an Unavailable attribute