[PATCH] D37663: [AST] Make RecursiveASTVisitor visit CXXOperatorCallExpr in source order
Johannes Altmanninger via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 11 07:02:48 PDT 2017
johannes added inline comments.
================
Comment at: include/clang/AST/RecursiveASTVisitor.h:334
+ case OO_Arrow:
+ case OO_Call:
+ case OO_Subscript:
----------------
klimek wrote:
> Why do we need to swap for calls?
The idea is that the opening parenthesis/bracket comes after the caller, for example in this call with two arguments.
```
`-CXXOperatorCallExpr
|-ImplicitCastExpr
| `-DeclRefExpr operator()
|-DeclRefExpr caller
|-IntegerLiteral
`-IntegerLiteral
```
Of course we fail to capture the fact that there is also a closing parenthesis or bracket. So this is no perfect solution.
https://reviews.llvm.org/D37663
More information about the cfe-commits
mailing list