[PATCH] D85750: [SyntaxTree] Unbox operators into tokens for nodes generated from `CXXOperatorCallExpr`
Dmitri Gribenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 11 10:11:28 PDT 2020
gribozavr2 accepted this revision.
gribozavr2 added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:1016
// operand because it does not correspond to anything written in source
// code
+ if (child->getSourceRange().isInvalid()) {
----------------
================
Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:1022-1023
}
- return WalkUpFromCXXOperatorCallExpr(S);
- } else
- return RecursiveASTVisitor::TraverseCXXOperatorCallExpr(S);
+ // An operator is treated as a simple token. This allows for an uniform
+ // representation of built-in and user-defined operators.
+ if (child->getBeginLoc() == S->getOperatorLoc())
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85750/new/
https://reviews.llvm.org/D85750
More information about the cfe-commits
mailing list