@@ -18,12 +18,12 @@ use clang_sys::CX_CXXPublic;
1818
1919use crate :: clang_ql:: values:: FunctionNode ;
2020
21- use super :: FunctionMatcher ;
21+ use super :: Matcher ;
2222
2323#[ derive( Clone ) ]
2424pub struct IsVirtualMatcher ;
2525
26- impl FunctionMatcher for IsVirtualMatcher {
26+ impl Matcher < FunctionNode > for IsVirtualMatcher {
2727 fn is_match ( & self , function : & FunctionNode ) -> bool {
2828 unsafe { clang_CXXMethod_isVirtual ( function. cursor ) != 0 }
2929 }
@@ -32,7 +32,7 @@ impl FunctionMatcher for IsVirtualMatcher {
3232#[ derive( Clone ) ]
3333pub struct IsPureVirtualMatcher ;
3434
35- impl FunctionMatcher for IsPureVirtualMatcher {
35+ impl Matcher < FunctionNode > for IsPureVirtualMatcher {
3636 fn is_match ( & self , function : & FunctionNode ) -> bool {
3737 unsafe { clang_CXXMethod_isPureVirtual ( function. cursor ) != 0 }
3838 }
@@ -41,7 +41,7 @@ impl FunctionMatcher for IsPureVirtualMatcher {
4141#[ derive( Clone ) ]
4242pub struct IsStaticMethodMatcher ;
4343
44- impl FunctionMatcher for IsStaticMethodMatcher {
44+ impl Matcher < FunctionNode > for IsStaticMethodMatcher {
4545 fn is_match ( & self , function : & FunctionNode ) -> bool {
4646 unsafe { clang_CXXMethod_isStatic ( function. cursor ) != 0 }
4747 }
@@ -50,7 +50,7 @@ impl FunctionMatcher for IsStaticMethodMatcher {
5050#[ derive( Clone ) ]
5151pub struct IsConstMethodMatcher ;
5252
53- impl FunctionMatcher for IsConstMethodMatcher {
53+ impl Matcher < FunctionNode > for IsConstMethodMatcher {
5454 fn is_match ( & self , function : & FunctionNode ) -> bool {
5555 unsafe { clang_CXXMethod_isConst ( function. cursor ) != 0 }
5656 }
@@ -59,7 +59,7 @@ impl FunctionMatcher for IsConstMethodMatcher {
5959#[ derive( Clone ) ]
6060pub struct IsDeletedMethodMatcher ;
6161
62- impl FunctionMatcher for IsDeletedMethodMatcher {
62+ impl Matcher < FunctionNode > for IsDeletedMethodMatcher {
6363 fn is_match ( & self , function : & FunctionNode ) -> bool {
6464 unsafe { clang_CXXMethod_isConst ( function. cursor ) != 0 }
6565 }
@@ -68,7 +68,7 @@ impl FunctionMatcher for IsDeletedMethodMatcher {
6868#[ derive( Clone ) ]
6969pub struct IsMethodMatcher ;
7070
71- impl FunctionMatcher for IsMethodMatcher {
71+ impl Matcher < FunctionNode > for IsMethodMatcher {
7272 fn is_match ( & self , function : & FunctionNode ) -> bool {
7373 unsafe { clang_getCursorKind ( function. cursor ) == CXCursor_CXXMethod }
7474 }
@@ -77,7 +77,7 @@ impl FunctionMatcher for IsMethodMatcher {
7777#[ derive( Clone ) ]
7878pub struct IsConstructorMatcher ;
7979
80- impl FunctionMatcher for IsConstructorMatcher {
80+ impl Matcher < FunctionNode > for IsConstructorMatcher {
8181 fn is_match ( & self , function : & FunctionNode ) -> bool {
8282 unsafe { clang_getCursorKind ( function. cursor ) == CXCursor_Constructor }
8383 }
@@ -86,7 +86,7 @@ impl FunctionMatcher for IsConstructorMatcher {
8686#[ derive( Clone ) ]
8787pub struct IsDefaultConstructorMatcher ;
8888
89- impl FunctionMatcher for IsDefaultConstructorMatcher {
89+ impl Matcher < FunctionNode > for IsDefaultConstructorMatcher {
9090 fn is_match ( & self , function : & FunctionNode ) -> bool {
9191 unsafe { clang_CXXConstructor_isDefaultConstructor ( function. cursor ) != 0 }
9292 }
@@ -95,7 +95,7 @@ impl FunctionMatcher for IsDefaultConstructorMatcher {
9595#[ derive( Clone ) ]
9696pub struct IsCopyConstructorMatcher ;
9797
98- impl FunctionMatcher for IsCopyConstructorMatcher {
98+ impl Matcher < FunctionNode > for IsCopyConstructorMatcher {
9999 fn is_match ( & self , function : & FunctionNode ) -> bool {
100100 unsafe { clang_CXXConstructor_isCopyConstructor ( function. cursor ) != 0 }
101101 }
@@ -104,7 +104,7 @@ impl FunctionMatcher for IsCopyConstructorMatcher {
104104#[ derive( Clone ) ]
105105pub struct IsMoveConstructorMatcher ;
106106
107- impl FunctionMatcher for IsMoveConstructorMatcher {
107+ impl Matcher < FunctionNode > for IsMoveConstructorMatcher {
108108 fn is_match ( & self , function : & FunctionNode ) -> bool {
109109 unsafe { clang_CXXConstructor_isMoveConstructor ( function. cursor ) != 0 }
110110 }
@@ -113,7 +113,7 @@ impl FunctionMatcher for IsMoveConstructorMatcher {
113113#[ derive( Clone ) ]
114114pub struct IsConvertingConstructorMatcher ;
115115
116- impl FunctionMatcher for IsConvertingConstructorMatcher {
116+ impl Matcher < FunctionNode > for IsConvertingConstructorMatcher {
117117 fn is_match ( & self , function : & FunctionNode ) -> bool {
118118 unsafe { clang_CXXConstructor_isConvertingConstructor ( function. cursor ) != 0 }
119119 }
@@ -122,7 +122,7 @@ impl FunctionMatcher for IsConvertingConstructorMatcher {
122122#[ derive( Clone ) ]
123123pub struct IsDestructorMatcher ;
124124
125- impl FunctionMatcher for IsDestructorMatcher {
125+ impl Matcher < FunctionNode > for IsDestructorMatcher {
126126 fn is_match ( & self , function : & FunctionNode ) -> bool {
127127 unsafe { clang_getCursorKind ( function. cursor ) == CXCursor_Destructor }
128128 }
@@ -153,7 +153,7 @@ impl AccessSpecifierMatcher {
153153 }
154154}
155155
156- impl FunctionMatcher for AccessSpecifierMatcher {
156+ impl Matcher < FunctionNode > for AccessSpecifierMatcher {
157157 fn is_match ( & self , function : & FunctionNode ) -> bool {
158158 unsafe { clang_getCXXAccessSpecifier ( function. cursor ) == self . access }
159159 }
0 commit comments