Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool is not guaranteed to be reading all the classes in the source code #18

Open
samasri opened this issue Feb 3, 2018 · 2 comments
Open
Labels

Comments

@samasri
Copy link
Owner

samasri commented Feb 3, 2018

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 a CXXRecordDecl, we use an iterator that iterates from bases_begin() to bases_end(). The iterator points to a QualType, which is a more specific Type. The Type can sometimes be converted to a CXXRecordDecl. OMRStatistics, inspired from OMRChecker code, ignores all Type objects that are not converted to CXXRecordDecl objects. However, after some tinkering with these ignored Type objects, we realize that they might be useful.

@samasri
Copy link
Owner Author

samasri commented Feb 3, 2018

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.

@samasri samasri added the bug label Mar 7, 2018
@samasri samasri added wontfix and removed bug labels Apr 5, 2018
@samasri
Copy link
Owner Author

samasri commented Apr 25, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant