eduucaldas added inline comments.

================
Comment at: clang/lib/Tooling/Syntax/BuildTree.cpp:118
 
+syntax::NodeKind getOperatorNodeKind(const CXXOperatorCallExpr &E) {
+  switch (E.getOperator()) {
----------------
# Where to put this logic? 
The pro of having this function inside `BuildTree.cpp` is that it is closer to 
it's *only* usage. And also for now `BuildTree.cpp` agglomerates everything 
that takes a semantic AST as an input, so it would be coherent.

Another option is to put it in `Nodes`, as it might serve as documentation for 
`*OperatorExpression`s. 
For example, it would document that the semantic node `CXXOperatorCallExpr` can 
also generate the syntax node `BinaryOperatorExpression`, which was previously 
only generated by a semantic `BinaryOperator`

Another option is to add put this function as a lambda inside 
`WalkUpFromCXXOperatorCallExpr` as probably it will only be used there. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82954/new/

https://reviews.llvm.org/D82954



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to