[PATCH] D67633: [libTooling] Add `access` and `ifBound` combinators to Stencil library.

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 23 04:28:49 PDT 2019


gribozavr accepted this revision.
gribozavr added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Tooling/Refactoring/Stencil.cpp:70
+// describing a member m, yields "e->m", when e is a pointer, "e2->m" when e =
+// "*e2" and "e.m" otherwise.
+struct AccessData {
----------------
I think for `e = &e2` it will also produce `e2.m`... Maybe don't describe things in such detail.

"A stencil operation that builds a member access `e.m` or `e->m` as appropriate.

The expression is specified as a bound ID, the member is specified as a stencil." 

I'm not even sure we need the second sentence.


================
Comment at: clang/lib/Tooling/Refactoring/Stencil.cpp:195
+using AccessOp = StencilPartImpl<AccessData>;
+using IfBoundOp = StencilPartImpl<IfBoundData>;
 } // namespace
----------------
These type aliases are only used once. Consider un-typealiasing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67633





More information about the cfe-commits mailing list