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
Diff Detail
- Build Status
Buildable 9626 Build 9626: arc lint + arc unit
Event Timeline
unittests/Tooling/LexicallyOrderedRecursiveASTVisitorTest.cpp | ||
---|---|---|
146 | This test also works before the change; what is the best way to enforce an ordering here? |
Awesome, thanks!
unittests/Tooling/LexicallyOrderedRecursiveASTVisitorTest.cpp | ||
---|---|---|
146 | 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. |
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 | I don't think you need to make this public with the new patch, right? |
I don't think you need to make this public with the new patch, right?