The operator is always the first child of such an expression.
If it is an infix operator, we want to print the LHS first.
Details
- Reviewers
arphaman
Diff Detail
- Build Status
Buildable 9573 Build 9573: arc lint + arc unit
Event Timeline
provide a test
need to update the maxsize parameter to -s=200 here because the test file is
expected to fit within this size
LGTM with one request below:
tools/clang-diff/ClangDiff.cpp | ||
---|---|---|
319 | Please add a short comment that describes why this out-of-order traversal is required |
tools/clang-diff/ClangDiff.cpp | ||
---|---|---|
319 | Should we do this in LexicallyOrderedRecursiveASTVisitor? There are some other cases with CXXOperatorCallExpr where the order needs to be changed, e.g. postfix operators, operator->, operator() and operator[]. |
tools/clang-diff/ClangDiff.cpp | ||
---|---|---|
319 | Sure, that would make sense. You probably don't need to sort, just figure out the right order from the specific combination of operator and infix/postfix. |
Please add a short comment that describes why this out-of-order traversal is required