@@ -3720,25 +3720,34 @@ private bool HasSuppressGCTransition(Cursor cursor)
37203720 return HasRemapping ( namedDecl , _config . WithSuppressGCTransitions ) ;
37213721 }
37223722
3723- private bool HasField ( RecordDecl recordDecl )
3723+ private bool HasBaseField ( CXXRecordDecl cxxRecordDecl )
37243724 {
3725- var hasFields = recordDecl . Fields . Any ( ) || recordDecl . Decls . Any ( ( decl ) => ( decl is RecordDecl nestedRecordDecl ) && nestedRecordDecl . IsAnonymousStructOrUnion && HasField ( nestedRecordDecl ) ) ;
3725+ var hasBaseField = false ;
37263726
3727- if ( ! hasFields && ( recordDecl is CXXRecordDecl cxxRecordDecl ) )
3727+ foreach ( var cxxBaseSpecifier in cxxRecordDecl . Bases )
37283728 {
3729- foreach ( var cxxBaseSpecifier in cxxRecordDecl . Bases )
3730- {
3731- var baseCxxRecordDecl = GetRecordDecl ( cxxBaseSpecifier ) ;
3729+ var baseCxxRecordDecl = GetRecordDecl ( cxxBaseSpecifier ) ;
37323730
3733- if ( HasField ( baseCxxRecordDecl ) )
3734- {
3735- hasFields = true ;
3736- break ;
3737- }
3731+ if ( HasField ( baseCxxRecordDecl ) )
3732+ {
3733+ hasBaseField = true ;
3734+ break ;
37383735 }
37393736 }
37403737
3741- return hasFields ;
3738+ return hasBaseField ;
3739+ }
3740+
3741+ private bool HasField ( RecordDecl recordDecl )
3742+ {
3743+ var hasField = recordDecl . Fields . Any ( ) || recordDecl . Decls . Any ( ( decl ) => ( decl is RecordDecl nestedRecordDecl ) && nestedRecordDecl . IsAnonymousStructOrUnion && HasField ( nestedRecordDecl ) ) ;
3744+
3745+ if ( ! hasField && ( recordDecl is CXXRecordDecl cxxRecordDecl ) )
3746+ {
3747+ hasField = HasBaseField ( cxxRecordDecl ) ;
3748+ }
3749+
3750+ return hasField ;
37423751 }
37433752
37443753 private bool HasUnsafeMethod ( CXXRecordDecl cxxRecordDecl )
@@ -3899,6 +3908,7 @@ bool IsExcludedByName(Cursor cursor, ref uint isExcludedValue)
38993908 var isExcludedByConfigOption = false ;
39003909
39013910 string qualifiedName ;
3911+ string qualifiedNameWithoutParameters = "" ;
39023912 string name ;
39033913 string kind ;
39043914
@@ -3908,6 +3918,12 @@ bool IsExcludedByName(Cursor cursor, ref uint isExcludedValue)
39083918 // can remove no-definition declarations in favor of remapped anonymous declarations.
39093919
39103920 qualifiedName = GetCursorQualifiedName ( namedDecl ) ;
3921+
3922+ if ( namedDecl is FunctionDecl )
3923+ {
3924+ qualifiedNameWithoutParameters = GetCursorQualifiedName ( namedDecl , truncateFunctionParameters : true ) ;
3925+ }
3926+
39113927 name = GetCursorName ( namedDecl ) ;
39123928 kind = $ "{ namedDecl . DeclKindName } declaration";
39133929
@@ -3992,7 +4008,9 @@ bool IsExcludedByName(Cursor cursor, ref uint isExcludedValue)
39924008 return true ;
39934009 }
39944010
3995- if ( _config . ExcludedNames . Contains ( name ) )
4011+ var dottedQualifiedNameWithoutParameters = qualifiedNameWithoutParameters . Replace ( "::" , "." ) ;
4012+
4013+ if ( _config . ExcludedNames . Contains ( qualifiedNameWithoutParameters ) || _config . ExcludedNames . Contains ( dottedQualifiedNameWithoutParameters ) || _config . ExcludedNames . Contains ( name ) )
39964014 {
39974015 if ( _config . LogExclusions )
39984016 {
@@ -4021,7 +4039,11 @@ bool IsExcludedByName(Cursor cursor, ref uint isExcludedValue)
40214039 return true ;
40224040 }
40234041
4024- if ( _config . IncludedNames . Any ( ) && ! _config . IncludedNames . Contains ( qualifiedName ) && ! _config . IncludedNames . Contains ( dottedQualifiedName ) && ! _config . IncludedNames . Contains ( name ) )
4042+ if ( _config . IncludedNames . Any ( ) && ! _config . IncludedNames . Contains ( qualifiedName )
4043+ && ! _config . IncludedNames . Contains ( dottedQualifiedName )
4044+ && ! _config . IncludedNames . Contains ( qualifiedNameWithoutParameters )
4045+ && ! _config . IncludedNames . Contains ( dottedQualifiedNameWithoutParameters )
4046+ && ! _config . IncludedNames . Contains ( name ) )
40254047 {
40264048 if ( _config . LogExclusions )
40274049 {
0 commit comments