<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>CPredicates (infer.ASTLanguage.CPredicates)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../../index.html">infer</a>»<ahref="../index.html">ASTLanguage</a>» CPredicates</nav><h1>Module <code>ASTLanguage.CPredicates</code></h1></header><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span> t</code><code> = <ahref="../ALVar/index.html#type-formula_id">ALVar.formula_id</a> * <span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a> list</span></code></dt><dd><p>(name, <code>param1,...,paramK</code>)</p></dd></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare"><ahref="#val-compare"class="anchor"></a><code><spanclass="keyword">val</span> compare : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec value"id="val-captured_variables_cxx_ref"><ahref="#val-captured_variables_cxx_ref"class="anchor"></a><code><spanclass="keyword">val</span> captured_variables_cxx_ref : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><span><ahref="../../ATDGenerated/Clang_ast_t/index.html#type-named_decl_info">ATDGenerated.Clang_ast_t.named_decl_info</a> list</span></code></dt><dd><p>list of cxx references captured by an ObjC Block</p></dd></dl><dl><dtclass="spec value"id="val-objc_block_is_capturing_var_of_type"><ahref="#val-objc_block_is_capturing_var_of_type"class="anchor"></a><code><spanclass="keyword">val</span> objc_block_is_capturing_var_of_type : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-t">ALVar.t</a><span>-></span> bool</code></dt><dd><p>true if the ObjC Block captures a variable of a given type</p></dd></dl><dl><dtclass="spec value"id="val-objc_block_is_capturing_values"><ahref="#val-objc_block_is_capturing_values"class="anchor"></a><code><spanclass="keyword">val</span> objc_block_is_capturing_values : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span> bool</code></dt><dd><p>true if the ObjC Block captures any variables</p></dd></dl><dl><dtclass="spec value"id="val-call_method"><ahref="#val-call_method"class="anchor"></a><code><spanclass="keyword">val</span> call_method : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p><code>call_method an m an</code> is true iff node an is a call to an ObjC method with name containing string m</p></dd></dl><dl><dtclass="spec value"id="val-call_cxx_method"><ahref="#val-call_cxx_method"class="anchor"></a><code><spanclass="keyword">val</span> call_cxx_method : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p><code>call_cxx_method an m an</code> is true iff node an is a call to a C++ method with name containing string m</p></dd></dl><dl><dtclass="spec value"id="val-call_class_method"><ahref="#val-call_class_method"class="anchor"></a><code><spanclass="keyword">val</span> call_class_method : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p><code>call
@implementation MyClass</code></pre></dd></dl><dl><dtclass="spec value"id="val-is_objc_interface_named"><ahref="#val-is_objc_interface_named"class="anchor"></a><code><spanclass="keyword">val</span> is_objc_interface_named : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p>Checks if the current node is an ObjCInterfaceDecl node whose name matches the provided REGEXP</p><p>Matches on <code>MyClass</code> in <code>@interface MyClass</code></p></dd></dl><dl><dtclass="spec value"id="val-is_objc_implementation_named"><ahref="#val-is_objc_implementation_named"class="anchor"></a><code><spanclass="keyword">val</span> is_objc_implementation_named : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p>Checks if the current node is an ObjCImplementationDecl node whose name matches the provided REGEXP</p><p>Matches on <code>MyClass</code> in <code>@implementation MyClass</code></p></dd></dl><dl><dtclass="spec value"id="val-is_objc_category_named"><ahref="#val-is_objc_category_named"class="anchor"></a><code><spanclass="keyword">val</span> is_objc_category_named : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p>Checks if the current node is an ObjCCategoryDecl or ObjCCategoryImplDecl node whose name matches the provided REGEXP</p><p>Matches on <code>MyCategory</code> in:</p><pre><codeclass="ml">@interface MyClass (MyCategory)
@implementation MyClass (MyCategory)</code></pre></dd></dl><dl><dtclass="spec value"id="val-is_objc_category_interface_named"><ahref="#val-is_objc_category_interface_named"class="anchor"></a><code><spanclass="keyword">val</span> is_objc_category_interface_named : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p>Checks if the current node is an ObjCCategoryDecl node whose name matches the provided REGEXP</p><p>Matches on <code>MyCategory</code> in <code>@interface MyClass (MyCategory)</code></p></dd></dl><dl><dtclass="spec value"id="val-is_objc_category_implementation_named"><ahref="#val-is_objc_category_implementation_named"class="anchor"></a><code><spanclass="keyword">val</span> is_objc_category_implementation_named : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p>Checks if the current node is an ObjCCategoryImplDecl node whose name matches the provided REGEXP</p><p>Matches on <code>MyCategory</code> in <code>@implementation MyClass (MyCategory)</code></p></dd></dl><dl><dtclass="spec value"id="val-is_objc_category_on_class_named"><ahref="#val-is_objc_category_on_class_named"class="anchor"></a><code><spanclass="keyword">val</span> is_objc_category_on_class_named : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p>Checks if the current node is an ObjCCategoryDecl or ObjCCategoryImplDecl node whose class name matches the provided REGEXP</p><p>Matches on <code>MyClass</code> in:</p><pre><codeclass="ml">@interface MyClass (MyCategory)
@implementation MyClass (MyCategory)</code></pre></dd></dl><dl><dtclass="spec value"id="val-is_objc_category_interface_on_class_named"><ahref="#val-is_objc_category_interface_on_class_named"class="anchor"></a><code><spanclass="keyword">val</span> is_objc_category_interface_on_class_named : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p>Checks if the current node is an ObjCCategoryDecl node whose class name matches the provided REGEXP</p><p>Matches on <code>MyClass</code> in <code>@interface MyClass (MyCategory)</code></p></dd></dl><dl><dtclass="spec value"id="val-is_objc_category_implementation_on_class_named"><ahref="#val-is_objc_category_implementation_on_class_named"class="anchor"></a><code><spanclass="keyword">val</span> is_objc_category_implementation_on_class_named : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p>Checks if the current node is an ObjCCategoryImplDecl node whose class name matches the provided REGEXP</p><p>Matches on <code>MyClass</code> in <code>@implementation MyClass (MyCategory)</code></p></dd></dl><dl><dtclass="spec value"id="val-is_objc_category_on_subclass_of"><ahref="#val-is_objc_category_on_subclass_of"class="anchor"></a><code><spanclass="keyword">val</span> is_objc_category_on_subclass_of : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p>Checks if the current node is an ObjCCategoryDecl or ObjCCategoryImplDecl node whose class inherits from a class whose name matches the provided REGEXP</p></dd></dl><dl><dtclass="spec value"id="val-is_objc_category_interface_on_subclass_of"><ahref="#val-is_objc_category_interface_on_subclass_of"class="anchor"></a><code><spanclass="keyword">val</span> is_objc_category_interface_on_subclass_of : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p>Checks if the current node is an ObjCCategoryDecl node whose class inherits from a class whose name matches the provided REGEXP</p></dd></dl><dl><dtclass="spec value"id="val-is_objc_category_implementation_on_subclass_of"><ahref="#val-is_objc_category_implementation_on_subclass_of"class="anchor"></a><code><spanclass="keyword">val</span> is_objc_category_implementation_on_subclass_of : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p>Checks if the current node is an ObjCCategoryImplDecl node whose class inherits from a class whose name matches the provided REGEXP</p></dd></dl><dl><dtclass="spec value"id="val-adhere_to_protocol"><ahref="#val-adhere_to_protocol"class="anchor"></a><code><spanclass="keyword">val</span> adhere_to_protocol : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span> bool</code></dt><dd><p>true if an objC class adhere to a protocol</p></dd></dl><dl><dtclass="spec value"id="val-is_objc_protocol_named"><ahref="#val-is_objc_protocol_named"class="anchor"></a><code><spanclass="keyword">val</span> is_objc_protocol_named : <ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><ahref="../ALVar/index.html#type-alexp">ALVar.alexp</a><span>-></span> bool</code></dt><dd><p>Checks if the current node is an ObjCProtocolDecl node whose name matches the provided REGEXP</p></dd></dl><dl><dtclass="spec value"id="val-is_objc_class_method_named"><ahref="#val-is_objc_