[clang-tools-extra] r277702 - Run clang-format on clang-rename code

Miklos Vajna via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 4 00:43:29 PDT 2016


Author: vmiklos
Date: Thu Aug  4 02:43:29 2016
New Revision: 277702

URL: http://llvm.org/viewvc/llvm-project?rev=277702&view=rev
Log:
Run clang-format on clang-rename code

So that later commits don't introduce non-functional changes when
running clang-format before committing.

Reviewers: klimek

Differential Revision: https://reviews.llvm.org/D23153

Modified:
    clang-tools-extra/trunk/clang-rename/RenamingAction.h
    clang-tools-extra/trunk/clang-rename/USRFinder.h
    clang-tools-extra/trunk/clang-rename/USRFindingAction.cpp

Modified: clang-tools-extra/trunk/clang-rename/RenamingAction.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-rename/RenamingAction.h?rev=277702&r1=277701&r2=277702&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-rename/RenamingAction.h (original)
+++ clang-tools-extra/trunk/clang-rename/RenamingAction.h Thu Aug  4 02:43:29 2016
@@ -41,7 +41,6 @@ private:
   std::map<std::string, tooling::Replacements> &FileToReplaces;
   bool PrintLocations;
 };
-
 }
 }
 

Modified: clang-tools-extra/trunk/clang-rename/USRFinder.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-rename/USRFinder.h?rev=277702&r1=277701&r2=277702&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-rename/USRFinder.h (original)
+++ clang-tools-extra/trunk/clang-rename/USRFinder.h Thu Aug  4 02:43:29 2016
@@ -49,7 +49,7 @@ std::string getUSRForDecl(const Decl *De
 class NestedNameSpecifierLocFinder : public MatchFinder::MatchCallback {
 public:
   explicit NestedNameSpecifierLocFinder(ASTContext &Context)
-    : Context(Context) {}
+      : Context(Context) {}
 
   std::vector<NestedNameSpecifierLoc> getNestedNameSpecifierLocations() {
     addMatchers();
@@ -65,8 +65,8 @@ private:
   }
 
   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);
   }
 
@@ -74,7 +74,6 @@ private:
   std::vector<NestedNameSpecifierLoc> Locations;
   MatchFinder Finder;
 };
-
 }
 }
 

Modified: clang-tools-extra/trunk/clang-rename/USRFindingAction.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-rename/USRFindingAction.cpp?rev=277702&r1=277701&r2=277702&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-rename/USRFindingAction.cpp (original)
+++ clang-tools-extra/trunk/clang-rename/USRFindingAction.cpp Thu Aug  4 02:43:29 2016
@@ -33,7 +33,6 @@
 #include <set>
 #include <vector>
 
-
 using namespace llvm;
 
 namespace clang {
@@ -47,8 +46,8 @@ namespace {
 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 @@ public:
     } 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 @@ public:
 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 @@ private:
   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
 




More information about the cfe-commits mailing list