[PATCH] D23153: Run clang-format on clang-rename code
Miklos Vajna via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 4 00:29:05 PDT 2016
vmiklos created this revision.
vmiklos added reviewers: klimek, omtcyfz.
vmiklos added a subscriber: cfe-commits.
So that later commits don't introduce non-functional changes when
running clang-format before committing.
https://reviews.llvm.org/D23153
Files:
clang-rename/RenamingAction.h
clang-rename/USRFinder.h
clang-rename/USRFindingAction.cpp
Index: clang-rename/USRFindingAction.cpp
===================================================================
--- clang-rename/USRFindingAction.cpp
+++ clang-rename/USRFindingAction.cpp
@@ -33,7 +33,6 @@
#include <set>
#include <vector>
-
using namespace llvm;
namespace clang {
@@ -47,8 +46,8 @@
class AdditionalUSRFinder : public RecursiveASTVisitor<AdditionalUSRFinder> {
public:
explicit AdditionalUSRFinder(const Decl *FoundDecl, ASTContext &Context,
- std::vector<std::string> *USRs)
- : FoundDecl(FoundDecl), Context(Context), USRs(USRs) {}
+ std::vector<std::string> *USRs)
+ : FoundDecl(FoundDecl), Context(Context), USRs(USRs) {}
void Find() {
// Fill OverriddenMethods and PartialSpecs storages.
@@ -63,7 +62,7 @@
} else if (const auto *RecordDecl = dyn_cast<CXXRecordDecl>(FoundDecl)) {
handleCXXRecordDecl(RecordDecl);
} else if (const auto *TemplateDecl =
- dyn_cast<ClassTemplateDecl>(FoundDecl)) {
+ dyn_cast<ClassTemplateDecl>(FoundDecl)) {
handleClassTemplateDecl(TemplateDecl);
} else {
USRSet.insert(getUSRForDecl(FoundDecl));
@@ -87,8 +86,8 @@
private:
void handleCXXRecordDecl(const CXXRecordDecl *RecordDecl) {
RecordDecl = RecordDecl->getDefinition();
- if (const auto *ClassTemplateSpecDecl
- = dyn_cast<ClassTemplateSpecializationDecl>(RecordDecl)) {
+ if (const auto *ClassTemplateSpecDecl =
+ dyn_cast<ClassTemplateSpecializationDecl>(RecordDecl)) {
handleClassTemplateDecl(ClassTemplateSpecDecl->getSpecializedTemplate());
}
addUSRsOfCtorDtors(RecordDecl);
@@ -137,8 +136,8 @@
ASTContext &Context;
std::vector<std::string> *USRs;
std::set<std::string> USRSet;
- std::vector<const CXXMethodDecl*> OverriddenMethods;
- std::vector<const ClassTemplatePartialSpecializationDecl*> PartialSpecs;
+ std::vector<const CXXMethodDecl *> OverriddenMethods;
+ std::vector<const ClassTemplatePartialSpecializationDecl *> PartialSpecs;
};
} // namespace
Index: clang-rename/USRFinder.h
===================================================================
--- clang-rename/USRFinder.h
+++ clang-rename/USRFinder.h
@@ -49,7 +49,7 @@
class NestedNameSpecifierLocFinder : public MatchFinder::MatchCallback {
public:
explicit NestedNameSpecifierLocFinder(ASTContext &Context)
- : Context(Context) {}
+ : Context(Context) {}
std::vector<NestedNameSpecifierLoc> getNestedNameSpecifierLocations() {
addMatchers();
@@ -65,16 +65,15 @@
}
virtual void run(const MatchFinder::MatchResult &Result) {
- const auto *NNS =
- Result.Nodes.getNodeAs<NestedNameSpecifierLoc>("nestedNameSpecifierLoc");
+ const auto *NNS = Result.Nodes.getNodeAs<NestedNameSpecifierLoc>(
+ "nestedNameSpecifierLoc");
Locations.push_back(*NNS);
}
ASTContext &Context;
std::vector<NestedNameSpecifierLoc> Locations;
MatchFinder Finder;
};
-
}
}
Index: clang-rename/RenamingAction.h
===================================================================
--- clang-rename/RenamingAction.h
+++ clang-rename/RenamingAction.h
@@ -41,7 +41,6 @@
std::map<std::string, tooling::Replacements> &FileToReplaces;
bool PrintLocations;
};
-
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23153.66766.patch
Type: text/x-patch
Size: 3316 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160804/0628c881/attachment.bin>
More information about the cfe-commits
mailing list