Details
- Reviewers
sammccall - Commits
- rG6c1a23303de9: [Syntax] Support condition for IfStmt.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Tooling/Syntax/BuildTree.cpp | ||
---|---|---|
803 | is it clear to you what all this code is doing? It seems correct, but I think I'll need to study later. |
clang/lib/Tooling/Syntax/BuildTree.cpp | ||
---|---|---|
803 | this is also my first time to see the pattern of overriding WalkUp function etc. The purpose of overriding the TraverseIfStmt is that the default implementation (which traverses the implicit condition expression which has the same location of the condition variable decl) seems to violate the invariant of foldNode (fold should not crosses boundaries of existing subtrees). I think the TraverseCXXForRangeStmt below follows the same patten :) |
is it clear to you what all this code is doing?
It does seem to fit the pattern used elsewhere, it just looks pretty different than the RAVs I've seen in the pass (e.g. overriding WalkUp functions).
It seems correct, but I think I'll need to study later.