[PATCH] D24178: [clang-rename] Fix some Clang-tidy modernize-use-override and Include What You Use warnings; other minor fixes

Eugene Zelenko via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 1 18:02:32 PDT 2016


Eugene.Zelenko created this revision.
Eugene.Zelenko added a reviewer: omtcyf0.
Eugene.Zelenko added a subscriber: cfe-commits.
Eugene.Zelenko set the repository for this revision to rL LLVM.

Repository:
  rL LLVM

https://reviews.llvm.org/D24178

Files:
  clang-rename/USRFinder.h

Index: clang-rename/USRFinder.h
===================================================================
--- clang-rename/USRFinder.h
+++ clang-rename/USRFinder.h
@@ -12,18 +12,21 @@
 /// code.
 ///
 //===----------------------------------------------------------------------===//
+
 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_RENAME_USR_FINDER_H
 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_RENAME_USR_FINDER_H
 
 #include "clang/AST/AST.h"
 #include "clang/AST/ASTContext.h"
 #include "clang/ASTMatchers/ASTMatchFinder.h"
 #include <string>
+#include <vector>
 
 using namespace llvm;
 using namespace clang::ast_matchers;
 
 namespace clang {
+
 class ASTContext;
 class Decl;
 class SourceLocation;
@@ -64,7 +67,7 @@
     Finder.addMatcher(NestedNameSpecifierLocMatcher, this);
   }
 
-  virtual void run(const MatchFinder::MatchResult &Result) {
+  void run(const MatchFinder::MatchResult &Result) override {
     const auto *NNS = Result.Nodes.getNodeAs<NestedNameSpecifierLoc>(
         "nestedNameSpecifierLoc");
     Locations.push_back(*NNS);
@@ -74,7 +77,8 @@
   std::vector<NestedNameSpecifierLoc> Locations;
   MatchFinder Finder;
 };
-}
-}
+
+} // namespace rename
+} // namespace clang
 
 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_RENAME_USR_FINDER_H


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24178.70119.patch
Type: text/x-patch
Size: 1245 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160902/e20de73a/attachment.bin>


More information about the cfe-commits mailing list