[PATCH] D39706: [refactor][extract] Initial implementation of variable captures

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 9 10:38:27 PST 2017


arphaman added inline comments.


================
Comment at: lib/Tooling/Refactoring/Extract/CaptureVariables.cpp:36
+      return true;
+    // FIXME: Capture 'self'.
+    if (!VD->isLocalVarDeclOrParm())
----------------
ioeric wrote:
> and `this`?
This is a different kind of expression that won't be handled in this method, and there's a fixit for 'this' further down already.


================
Comment at: lib/Tooling/Refactoring/Extract/CaptureVariables.h:36
+  explicit CapturedExtractedEntity(const VarDecl *VD)
+      : Kind(CapturedVarDecl), VD(VD) {}
+
----------------
ioeric wrote:
> Maybe a `FIXME` here for `Kind`?
I think this constructor will always set the same kind.


Repository:
  rL LLVM

https://reviews.llvm.org/D39706





More information about the cfe-commits mailing list