[PATCH] D26665: [clang-move] Support moving function.
Eric Liu via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 16 03:20:29 PST 2016
ioeric accepted this revision.
ioeric added a comment.
This revision is now accepted and ready to land.
Lg with two nits.
================
Comment at: clang-move/ClangMove.cpp:145
+ void run(const MatchFinder::MatchResult &Result) override {
+ auto *SM = &Result.Context->getSourceManager();
+ if (const auto *FD =
----------------
Maybe just inline this variable since this is only used once.
================
Comment at: clang-move/ClangMove.cpp:146
+ auto *SM = &Result.Context->getSourceManager();
+ if (const auto *FD =
+ Result.Nodes.getNodeAs<clang::FunctionDecl>("function")) {
----------------
I'd `assert(FD)` instead.
https://reviews.llvm.org/D26665
More information about the cfe-commits
mailing list