@@ -18,6 +18,7 @@ use crate::clang_ql::matchers::IsMethodMatcher;
18
18
use crate :: clang_ql:: matchers:: IsMoveConstructorMatcher ;
19
19
use crate :: clang_ql:: matchers:: IsPureVirtualMatcher ;
20
20
use crate :: clang_ql:: matchers:: IsStaticMethodMatcher ;
21
+ use crate :: clang_ql:: matchers:: IsTemplateFunction ;
21
22
use crate :: clang_ql:: matchers:: IsVirtualMatcher ;
22
23
use crate :: clang_ql:: types:: FunctionMatcherType ;
23
24
use crate :: clang_ql:: types:: FunctionType ;
@@ -30,6 +31,7 @@ pub(crate) fn register_function_matchers_functions(
30
31
) {
31
32
map. insert ( "m_function" , match_function) ;
32
33
34
+ map. insert ( "m_template_function" , match_template_function) ;
33
35
map. insert ( "m_virtual" , match_virtual_function) ;
34
36
map. insert ( "m_pure_virtual" , match_pure_virtual_function) ;
35
37
map. insert ( "m_static" , match_static_function) ;
@@ -61,6 +63,11 @@ pub(crate) fn register_function_matchers_signatures(map: &mut HashMap<&'static s
61
63
. add_parameter ( Box :: new ( FunctionMatcherType ) ) ,
62
64
) ;
63
65
66
+ map. insert (
67
+ "m_template_function" ,
68
+ Signature :: with_return ( Box :: new ( FunctionMatcherType ) ) ,
69
+ ) ;
70
+
64
71
map. insert (
65
72
"m_virtual" ,
66
73
Signature :: with_return ( Box :: new ( FunctionMatcherType ) ) ,
@@ -142,6 +149,11 @@ fn match_function(values: &[Box<dyn Value>]) -> Box<dyn Value> {
142
149
Box :: new ( BoolValue :: new ( is_matches) )
143
150
}
144
151
152
+ fn match_template_function ( _values : & [ Box < dyn Value > ] ) -> Box < dyn Value > {
153
+ let matcher = Box :: new ( IsTemplateFunction ) ;
154
+ Box :: new ( FunctionMatcherValue :: new ( matcher) )
155
+ }
156
+
145
157
fn match_virtual_function ( _values : & [ Box < dyn Value > ] ) -> Box < dyn Value > {
146
158
let matcher = Box :: new ( IsVirtualMatcher ) ;
147
159
Box :: new ( FunctionMatcherValue :: new ( matcher) )
0 commit comments