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

Move EnumVisitor TraverseType code to TraverseDecl function and test #1281

Open
spfennell opened this issue Jun 9, 2022 · 1 comment
Open

Comments

@spfennell
Copy link
Contributor

Before llvm+clang 14, EnumVisitor TraverseDecl also traversed the type. LLVM + Clang determined this to be a bug, so now we also call TraverseType in TranslationUnitVisitor.cpp and ClassVisitor.cpp

evis.TraverseDecl(ed) ;
#if (LIBCLANG_MAJOR >= 14)
evis.TraverseType(clang::QualType(ed->getTypeForDecl(), 0));
#endif

We can move the EnumVisitor::VisitEnumType code to VisitEnumDecl, but I don't want to do this without adding more tests to make sure all the enum edge cases work. There might be some callback function called when traversing a type that gets missed when only visiting enumDecl (maybe for const enums, anonymous enums, or some other edge case).

@spfennell
Copy link
Contributor Author

This issue can be closed when the code is moved and tested as described above

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

No branches or pull requests

1 participant