@@ -15,6 +15,8 @@ use crate::clang_ql::matchers::IsCopyConstructorMatcher;
1515use crate :: clang_ql:: matchers:: IsDefaultConstructorMatcher ;
1616use crate :: clang_ql:: matchers:: IsDeletedMethodMatcher ;
1717use crate :: clang_ql:: matchers:: IsDestructorMatcher ;
18+ use crate :: clang_ql:: matchers:: IsFunctionDeclaration ;
19+ use crate :: clang_ql:: matchers:: IsFunctionDefination ;
1820use crate :: clang_ql:: matchers:: IsMethodMatcher ;
1921use crate :: clang_ql:: matchers:: IsMoveConstructorMatcher ;
2022use crate :: clang_ql:: matchers:: IsPureVirtualMatcher ;
@@ -32,6 +34,8 @@ pub(crate) fn register_function_matchers_functions(
3234) {
3335 map. insert ( "m_function" , match_function) ;
3436
37+ map. insert ( "m_function_decl" , match_function_declaration) ;
38+ map. insert ( "m_function_def" , match_function_defination) ;
3539 map. insert ( "m_template_function" , match_template_function) ;
3640 map. insert ( "m_conversion_function" , match_conversion_function) ;
3741 map. insert ( "m_virtual" , match_virtual_function) ;
@@ -65,6 +69,16 @@ pub(crate) fn register_function_matchers_signatures(map: &mut HashMap<&'static s
6569 . add_parameter ( Box :: new ( FunctionMatcherType ) ) ,
6670 ) ;
6771
72+ map. insert (
73+ "m_function_decl" ,
74+ Signature :: with_return ( Box :: new ( FunctionMatcherType ) ) ,
75+ ) ;
76+
77+ map. insert (
78+ "m_function_def" ,
79+ Signature :: with_return ( Box :: new ( FunctionMatcherType ) ) ,
80+ ) ;
81+
6882 map. insert (
6983 "m_template_function" ,
7084 Signature :: with_return ( Box :: new ( FunctionMatcherType ) ) ,
@@ -156,6 +170,16 @@ fn match_function(values: &[Box<dyn Value>]) -> Box<dyn Value> {
156170 Box :: new ( BoolValue :: new ( is_matches) )
157171}
158172
173+ fn match_function_declaration ( _values : & [ Box < dyn Value > ] ) -> Box < dyn Value > {
174+ let matcher = Box :: new ( IsFunctionDeclaration ) ;
175+ Box :: new ( FunctionMatcherValue :: new ( matcher) )
176+ }
177+
178+ fn match_function_defination ( _values : & [ Box < dyn Value > ] ) -> Box < dyn Value > {
179+ let matcher = Box :: new ( IsFunctionDefination ) ;
180+ Box :: new ( FunctionMatcherValue :: new ( matcher) )
181+ }
182+
159183fn match_template_function ( _values : & [ Box < dyn Value > ] ) -> Box < dyn Value > {
160184 let matcher = Box :: new ( IsTemplateFunction ) ;
161185 Box :: new ( FunctionMatcherValue :: new ( matcher) )
0 commit comments