Open samasri opened 6 years ago
When asking Matthew about it why are non-CXXRecordDecl
objects ignored in OMRChecker source code, the top of his head suspicion was to avoid forward declarations. However, I need to investigate this further; the plan I have in mind for this:
Print the names and locations of all the non-CXXRecordDecl
objects passed through by the bases iterator and check if they are forward declarations.
A consequence to that is shown when collecting function calls. Some calls are generated by unions, structs, or template methods, these calls are ignored since the receiver is not found in the list of classes.
Summary: non-class structures (like structs and unions) and some template classes are not processed
In
VisitCXXRecord
function, we ignore all CXX records that are not classes (hence, unions and structs are ignored). In addition, when trying to iterate through parents of aCXXRecordDecl
, we use an iterator that iterates frombases_begin()
tobases_end()
. The iterator points to aQualType
, which is a more specificType
. TheType
can sometimes be converted to aCXXRecordDecl
. OMRStatistics, inspired from OMRChecker code, ignores allType
objects that are not converted toCXXRecordDecl
objects. However, after some tinkering with these ignoredType
objects, we realize that they might be useful.