[PATCH] D33061: [tooling] RefactoringCallbacks code cleanup
Alexander Shaposhnikov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 11 17:30:14 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL302855: [tooling] RefactoringCallbacks code cleanup (authored by alexshap).
Changed prior to commit:
https://reviews.llvm.org/D33061?vs=98509&id=98704#toc
Repository:
rL LLVM
https://reviews.llvm.org/D33061
Files:
cfe/trunk/include/clang/Tooling/RefactoringCallbacks.h
cfe/trunk/lib/Tooling/RefactoringCallbacks.cpp
Index: cfe/trunk/include/clang/Tooling/RefactoringCallbacks.h
===================================================================
--- cfe/trunk/include/clang/Tooling/RefactoringCallbacks.h
+++ cfe/trunk/include/clang/Tooling/RefactoringCallbacks.h
@@ -53,7 +53,8 @@
/// Runs AST matchers and stores the \c tooling::Replacements in a map.
class ASTMatchRefactorer {
public:
- ASTMatchRefactorer(std::map<std::string, Replacements> &FileToReplaces);
+ explicit ASTMatchRefactorer(
+ std::map<std::string, Replacements> &FileToReplaces);
template <typename T>
void addMatcher(const T &Matcher, RefactoringCallback *Callback) {
@@ -103,7 +104,7 @@
std::string Value;
};
ReplaceNodeWithTemplate(llvm::StringRef FromId,
- std::vector<TemplateElement> &&Template);
+ std::vector<TemplateElement> Template);
std::string FromId;
std::vector<TemplateElement> Template;
};
Index: cfe/trunk/lib/Tooling/RefactoringCallbacks.cpp
===================================================================
--- cfe/trunk/lib/Tooling/RefactoringCallbacks.cpp
+++ cfe/trunk/lib/Tooling/RefactoringCallbacks.cpp
@@ -38,7 +38,7 @@
class RefactoringASTConsumer : public ASTConsumer {
public:
- RefactoringASTConsumer(ASTMatchRefactorer &Refactoring)
+ explicit RefactoringASTConsumer(ASTMatchRefactorer &Refactoring)
: Refactoring(Refactoring) {}
void HandleTranslationUnit(ASTContext &Context) override {
@@ -153,8 +153,8 @@
}
ReplaceNodeWithTemplate::ReplaceNodeWithTemplate(
- llvm::StringRef FromId, std::vector<TemplateElement> &&Template)
- : FromId(FromId), Template(Template) {}
+ llvm::StringRef FromId, std::vector<TemplateElement> Template)
+ : FromId(FromId), Template(std::move(Template)) {}
llvm::Expected<std::unique_ptr<ReplaceNodeWithTemplate>>
ReplaceNodeWithTemplate::create(StringRef FromId, StringRef ToTemplate) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33061.98704.patch
Type: text/x-patch
Size: 1930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170512/62d4cd24/attachment-0001.bin>
More information about the cfe-commits
mailing list