[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 8 07:48:35 PST 2017


ioeric added inline comments.


================
Comment at: lib/Tooling/RefactoringCallbacks.cpp:160
+llvm::Expected<std::unique_ptr<ReplaceNodeWithTemplate>>
+ReplaceNodeWithTemplate::create(StringRef FromId, StringRef ToTemplate) {
+  std::vector<TemplateElement> ParsedTemplate;
----------------
Is this covered in the test?


================
Comment at: unittests/Tooling/RefactoringCallbacksTest.cpp:101
+  std::string Expected = "void f() { FOO }";
+  ReplaceNodeWithTemplate Callback("id", "FOO");
+  expectRewritten(Code, Expected, id("id", declStmt()), Callback);
----------------
Have you rerun the tests? Does this still build?


https://reviews.llvm.org/D29621





More information about the cfe-commits mailing list