We need to specialize this because RecursiveASTVisitor visits template
template parameters after the templated declaration, unlike the order in
which they appear in the source code.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
unittests/Tooling/LexicallyOrderedRecursiveASTVisitorTest.cpp | ||
---|---|---|
146 ↗ | (On Diff #112671) | This test also works before the change; what is the best way to enforce an ordering here? |
Comment Actions
Awesome, thanks!
unittests/Tooling/LexicallyOrderedRecursiveASTVisitorTest.cpp | ||
---|---|---|
146 ↗ | (On Diff #112671) | You can add a flag to LexicallyOrderedDeclVisitor that emits the ordering index when it's true and turn it on for this test. Then you'd should get something like /f/T@0 and /f/T@1. Please test a class template as well. |
Comment Actions
This is currently broken, if a user provides a TraverseClassTemplateDecl, then the same method in this class will not be called, I think I will add a flag (probably not user visible) in RecursiveASTVisitor.h to switch the order for templates
include/clang/AST/RecursiveASTVisitor.h | ||
---|---|---|
507–508 ↗ | (On Diff #113546) | I don't think you need to make this public with the new patch, right? |
This comment was removed by pdouglas.