RecursiveASTVisitor has special code for handling operator AST nodes,
specifically, unary, binary, and compound assignment operators. In this
change I'm adding tests for operator AST nodes that follow the existing
pattern of tests for the CallExpr node (an AST node that triggers the
common code path).
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/unittests/Tooling/RecursiveASTVisitorTests/Callbacks.cpp | ||
---|---|---|
398 | Phabricator shows the diff as a modification, but it is actually an addition -- new tests are just very similar to existing tests for binary operators, so the diff algorithm is confused. You can find old tests for binary operators below, shown as code being added. |
clang/unittests/Tooling/RecursiveASTVisitorTests/Callbacks.cpp | ||
---|---|---|
501–503 | A question came to mind: " Does WalkUpFromUnaryMinus walk up to WalkUpFromUnaryOperator? " Perhaps that could be included in a test. |
clang/unittests/Tooling/RecursiveASTVisitorTests/Callbacks.cpp | ||
---|---|---|
501–503 | Good question -- but it is already covered by the StmtCallbacks_WalkUpFromUnaryMinus test. |
Phabricator shows the diff as a modification, but it is actually an addition -- new tests are just very similar to existing tests for binary operators, so the diff algorithm is confused. You can find old tests for binary operators below, shown as code being added.