[PATCH] D86227: [SyntaxTree] Add support for `MemberExpression`

Eduardo Caldas via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 19 10:02:09 PDT 2020


eduucaldas added a reviewer: gribozavr2.
eduucaldas added inline comments.


================
Comment at: clang/include/clang/Tooling/Syntax/Nodes.h:333
+///   expression .  template_opt id-expression
+///   id-expression
+/// e.g. `x.a`, `xp->a` or even just `a` when we have an implicit `this->`.
----------------
We could discuss how to model the implicit member expression, as it has a totally different syntax.


================
Comment at: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp:1769-1771
+// FIXME: Remove additional `UnknownExpression` wrapping `x`. For that, ignore
+// implicit copy constructor called on `x`. This should've been ignored already,
+// as we `IgnoreImplicit` when traversing an `Stmt`.
----------------
Not much progress trying to use other ignores. Perhaps we can treat this properly when adding support for `CXXConstructExpr`


================
Comment at: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp:2086-2087
+  int geta(){
+    // FIXME: Remove the terminal`UnknownExpression` wrapping `a`. This
+    // `UnknownExpression` comes from a terminal implicit `CXXThisExpr`.
+    [[a]];
----------------
I'm experimenting with that now, but anyways, I think this should go to the patch, 
> [SyntaxTree] Add support to `CXXThisExpr`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86227



More information about the cfe-commits mailing list