HomePhabricator

[SyntaxTree] Unbox operators into tokens for nodes generated from…

Authored by eduucaldas on Aug 11 2020, 9:28 AM.

Description

[SyntaxTree] Unbox operators into tokens for nodes generated from CXXOperatorCallExpr

For an user define <, x < y would yield the syntax tree:

BinaryOperatorExpression
|-IdExpression
| `-UnqualifiedId
|   `-x
|-IdExpression
| `-UnqualifiedId
|   `-<
`-IdExpression
  `-UnqualifiedId
    `-y

But there is no syntatic difference at call site between call site or
built-in <. As such they should generate the same syntax tree, namely:

BinaryOperatorExpression
|-IdExpression
| `-UnqualifiedId
|   `-x
|-<
`-IdExpression
  `-UnqualifiedId
    `-y

Differential Revision: https://reviews.llvm.org/D85750