ioeric accepted this revision.
ioeric added a comment.
This revision is now accepted and ready to land.
Lg
(Sorry for losing track of this and the delay!)
Repository:
rL LLVM
https://reviews.llvm.org/D39706
___
cfe-commits mailing list
cfe-commi
arphaman updated this revision to Diff 122565.
arphaman marked 3 inline comments as done.
arphaman added a comment.
Address review comments
Repository:
rL LLVM
https://reviews.llvm.org/D39706
Files:
lib/Tooling/Refactoring/CMakeLists.txt
lib/Tooling/Refactoring/Extract/CaptureVariables.c
arphaman added inline comments.
Comment at: lib/Tooling/Refactoring/Extract/CaptureVariables.h:36
+ explicit CapturedExtractedEntity(const VarDecl *VD)
+ : Kind(CapturedVarDecl), VD(VD) {}
+
ioeric wrote:
> arphaman wrote:
> > ioeric wrote:
> > > Maybe a `F
ioeric added inline comments.
Comment at: lib/Tooling/Refactoring/Extract/CaptureVariables.cpp:97
+ }
+ llvm_unreachable("invalid kind!");
+}
A more informative message would be better.
Comment at: lib/Tooling/Refactoring/Extract/CaptureVaria
arphaman updated this revision to Diff 122270.
arphaman marked 5 inline comments as done.
arphaman added a comment.
Address review comments
Repository:
rL LLVM
https://reviews.llvm.org/D39706
Files:
lib/Tooling/Refactoring/CMakeLists.txt
lib/Tooling/Refactoring/Extract/CaptureVariables.c
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 wo
ioeric added a comment.
Implementation looks good. Just some nits.
Comment at: lib/Tooling/Refactoring/Extract/CaptureVariables.cpp:36
+ return true;
+// FIXME: Capture 'self'.
+if (!VD->isLocalVarDeclOrParm())
and `this`?
Commen
arphaman created this revision.
Herald added a subscriber: mgorny.
This patch adds an initial rudimentary support for capturing variables that
should be passed to the extracted function.
The variables are passed to the extracted function if they're used in the
extracted code. If they're defined