File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,18 @@ public static bool IsEnumNestedInClass(this ASTRecord<Declaration> record)
163
163
return false ;
164
164
}
165
165
166
+ public static bool IsClassReturn ( this ASTRecord record )
167
+ {
168
+ var ancestors = new Stack < object > ( ) ;
169
+ if ( ! record . GetAncestors < Function > ( ref ancestors ) )
170
+ return false ;
171
+
172
+ var function = ( Function ) ancestors . Pop ( ) ;
173
+ var tagType = function . ReturnType . Type . Desugar ( ) as TagType ;
174
+
175
+ return tagType ? . Declaration is Class ;
176
+ }
177
+
166
178
public static bool IsDelegate ( this ASTRecord record )
167
179
{
168
180
var typedef = record . Object as TypedefDecl ;
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ public bool IsIncludeInHeader(ASTRecord<Declaration> record)
164
164
return false ;
165
165
166
166
return record . IsBaseClass ( ) || record . IsFieldValueType ( ) || record . IsDelegate ( )
167
- || record . IsEnumNestedInClass ( ) ;
167
+ || record . IsEnumNestedInClass ( ) || record . IsClassReturn ( ) ;
168
168
}
169
169
170
170
public override bool VisitDeclaration ( Declaration decl )
You can’t perform that action at this time.
0 commit comments