Re: [PATCH] D23153: Run clang-format on clang-rename code

2016-08-04 Thread Miklos Vajna via cfe-commits
vmiklos added a comment.

Thanks. Yes, I used the Linux-distro-provided clang-format-3.7, I didn't notice 
that the trunk version now also sorts includes.


Repository:
  rL LLVM

https://reviews.llvm.org/D23153



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D23153: Run clang-format on clang-rename code

2016-08-04 Thread Kirill Bobyrev via cfe-commits
omtcyfz added a comment.

Actually few changes `clang-format` would produce weren't there. It's either 
you used old `clang-format` or you missed them, but there were header 
reordering issues. Pushed quick fix.


Repository:
  rL LLVM

https://reviews.llvm.org/D23153



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D23153: Run clang-format on clang-rename code

2016-08-04 Thread Miklos Vajna via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL277702: Run clang-format on clang-rename code (authored by 
vmiklos).

Changed prior to commit:
  https://reviews.llvm.org/D23153?vs=66766&id=66769#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23153

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

Index: clang-tools-extra/trunk/clang-rename/RenamingAction.h
===
--- clang-tools-extra/trunk/clang-rename/RenamingAction.h
+++ clang-tools-extra/trunk/clang-rename/RenamingAction.h
@@ -41,7 +41,6 @@
   std::map &FileToReplaces;
   bool PrintLocations;
 };
-
 }
 }
 
Index: clang-tools-extra/trunk/clang-rename/USRFindingAction.cpp
===
--- clang-tools-extra/trunk/clang-rename/USRFindingAction.cpp
+++ clang-tools-extra/trunk/clang-rename/USRFindingAction.cpp
@@ -33,7 +33,6 @@
 #include 
 #include 
 
-
 using namespace llvm;
 
 namespace clang {
@@ -47,8 +46,8 @@
 class AdditionalUSRFinder : public RecursiveASTVisitor {
 public:
   explicit AdditionalUSRFinder(const Decl *FoundDecl, ASTContext &Context,
- std::vector *USRs)
-: FoundDecl(FoundDecl), Context(Context), USRs(USRs) {}
+   std::vector *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(FoundDecl)) {
   handleCXXRecordDecl(RecordDecl);
 } else if (const auto *TemplateDecl =
-   dyn_cast(FoundDecl)) {
+   dyn_cast(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(RecordDecl)) {
+if (const auto *ClassTemplateSpecDecl =
+dyn_cast(RecordDecl)) {
   handleClassTemplateDecl(ClassTemplateSpecDecl->getSpecializedTemplate());
 }
 addUSRsOfCtorDtors(RecordDecl);
@@ -137,8 +136,8 @@
   ASTContext &Context;
   std::vector *USRs;
   std::set USRSet;
-  std::vector OverriddenMethods;
-  std::vector PartialSpecs;
+  std::vector OverriddenMethods;
+  std::vector PartialSpecs;
 };
 } // namespace
 
Index: clang-tools-extra/trunk/clang-rename/USRFinder.h
===
--- clang-tools-extra/trunk/clang-rename/USRFinder.h
+++ clang-tools-extra/trunk/clang-rename/USRFinder.h
@@ -49,7 +49,7 @@
 class NestedNameSpecifierLocFinder : public MatchFinder::MatchCallback {
 public:
   explicit NestedNameSpecifierLocFinder(ASTContext &Context)
-: Context(Context) {}
+  : Context(Context) {}
 
   std::vector getNestedNameSpecifierLocations() {
 addMatchers();
@@ -65,16 +65,15 @@
   }
 
   virtual void run(const MatchFinder::MatchResult &Result) {
-const auto *NNS =
-
Result.Nodes.getNodeAs("nestedNameSpecifierLoc");
+const auto *NNS = Result.Nodes.getNodeAs(
+"nestedNameSpecifierLoc");
 Locations.push_back(*NNS);
   }
 
   ASTContext &Context;
   std::vector Locations;
   MatchFinder Finder;
 };
-
 }
 }
 


Index: clang-tools-extra/trunk/clang-rename/RenamingAction.h
===
--- clang-tools-extra/trunk/clang-rename/RenamingAction.h
+++ clang-tools-extra/trunk/clang-rename/RenamingAction.h
@@ -41,7 +41,6 @@
   std::map &FileToReplaces;
   bool PrintLocations;
 };
-
 }
 }
 
Index: clang-tools-extra/trunk/clang-rename/USRFindingAction.cpp
===
--- clang-tools-extra/trunk/clang-rename/USRFindingAction.cpp
+++ clang-tools-extra/trunk/clang-rename/USRFindingAction.cpp
@@ -33,7 +33,6 @@
 #include 
 #include 
 
-
 using namespace llvm;
 
 namespace clang {
@@ -47,8 +46,8 @@
 class AdditionalUSRFinder : public RecursiveASTVisitor {
 public:
   explicit AdditionalUSRFinder(const Decl *FoundDecl, ASTContext &Context,
- std::vector *USRs)
-: FoundDecl(FoundDecl), Context(Context), USRs(USRs) {}
+   std::vector *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(FoundDecl)) {
   handleCXXRecordDecl(RecordDecl);
 } else if (const auto *TemplateDecl =
-   dyn_cast(FoundDecl)) {
+   dyn_cast(FoundDecl)) {
   handleClassTemplateDecl(TemplateDecl);
 } else {
   USRSet.insert

Re: [PATCH] D23153: Run clang-format on clang-rename code

2016-08-04 Thread Manuel Klimek via cfe-commits
klimek accepted this revision.
klimek added a comment.
This revision is now accepted and ready to land.

lg


https://reviews.llvm.org/D23153



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits