[clang-tools-extra] r268262 - [include-fixer] Fix Clang-tidy modernize-use-override and some Include What You Use warnings.

Eugene Zelenko via cfe-commits cfe-commits at lists.llvm.org
Mon May 2 10:49:00 PDT 2016


Author: eugenezelenko
Date: Mon May  2 12:49:00 2016
New Revision: 268262

URL: http://llvm.org/viewvc/llvm-project?rev=268262&view=rev
Log:
[include-fixer] Fix Clang-tidy modernize-use-override and some Include What You Use warnings.

Differential revision: http://reviews.llvm.org/D19755

Modified:
    clang-tools-extra/trunk/include-fixer/IncludeFixer.h
    clang-tools-extra/trunk/include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp
    clang-tools-extra/trunk/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp

Modified: clang-tools-extra/trunk/include-fixer/IncludeFixer.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/include-fixer/IncludeFixer.h?rev=268262&r1=268261&r2=268262&view=diff
==============================================================================
--- clang-tools-extra/trunk/include-fixer/IncludeFixer.h (original)
+++ clang-tools-extra/trunk/include-fixer/IncludeFixer.h Mon May  2 12:49:00 2016
@@ -11,11 +11,18 @@
 #define LLVM_CLANG_TOOLS_EXTRA_INCLUDE_FIXER_INCLUDEFIXER_H
 
 #include "XrefsDB.h"
-#include "clang/Lex/PreprocessorOptions.h"
 #include "clang/Tooling/Core/Replacement.h"
 #include "clang/Tooling/Tooling.h"
+#include <memory>
+#include <vector>
 
 namespace clang {
+
+class CompilerInvocation;
+class DiagnosticConsumer;
+class FileManager;
+class PCHContainerOperations;
+
 namespace include_fixer {
 
 class IncludeFixerActionFactory : public clang::tooling::ToolAction {
@@ -26,7 +33,7 @@ public:
   IncludeFixerActionFactory(
       XrefsDB &Xrefs, std::vector<clang::tooling::Replacement> &Replacements,
       bool MinimizeIncludePaths = true);
-  ~IncludeFixerActionFactory();
+  ~IncludeFixerActionFactory() override;
 
   bool
   runInvocation(clang::CompilerInvocation *Invocation,

Modified: clang-tools-extra/trunk/include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp?rev=268262&r1=268261&r2=268262&view=diff
==============================================================================
--- clang-tools-extra/trunk/include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp (original)
+++ clang-tools-extra/trunk/include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp Mon May  2 12:49:00 2016
@@ -8,16 +8,24 @@
 //===----------------------------------------------------------------------===//
 
 #include "FindAllSymbols.h"
+#include "SymbolInfo.h"
 #include "clang/ASTMatchers/ASTMatchFinder.h"
-#include "clang/ASTMatchers/ASTMatchers.h"
-#include "clang/Frontend/FrontendActions.h"
 #include "clang/Tooling/CommonOptionsParser.h"
 #include "clang/Tooling/Tooling.h"
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/SmallString.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/FileSystem.h"
+#include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/ThreadPool.h"
+#include "llvm/Support/raw_ostream.h"
 #include <map>
 #include <mutex>
+#include <set>
 #include <string>
+#include <system_error>
 #include <vector>
 
 using namespace clang::tooling;
@@ -52,7 +60,7 @@ namespace find_all_symbols {
 class YamlReporter
     : public clang::find_all_symbols::FindAllSymbols::ResultReporter {
 public:
-  ~YamlReporter() {}
+  ~YamlReporter() override {}
 
   void reportResult(StringRef FileName, const SymbolInfo &Symbol) override {
     Symbols[FileName].insert(Symbol);

Modified: clang-tools-extra/trunk/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp?rev=268262&r1=268261&r2=268262&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp Mon May  2 12:49:00 2016
@@ -8,9 +8,20 @@
 //===----------------------------------------------------------------------===//
 
 #include "FindAllSymbols.h"
+#include "SymbolInfo.h"
+#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/Basic/FileManager.h"
+#include "clang/Basic/FileSystemOptions.h"
+#include "clang/Basic/VirtualFileSystem.h"
+#include "clang/Frontend/PCHContainerOperations.h"
 #include "clang/Tooling/Tooling.h"
-#include "llvm/Support/YAMLTraits.h"
+#include "llvm/ADT/IntrusiveRefCntPtr.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/MemoryBuffer.h"
 #include "gtest/gtest.h"
+#include <memory>
+#include <string>
+#include <vector>
 
 namespace clang {
 namespace find_all_symbols {
@@ -20,7 +31,7 @@ static const char HeaderName[] = "symbol
 class MockReporter
     : public clang::find_all_symbols::FindAllSymbols::ResultReporter {
 public:
-  ~MockReporter() {}
+  ~MockReporter() override {}
 
   void reportResult(llvm::StringRef FileName,
                     const SymbolInfo &Symbol) override {




More information about the cfe-commits mailing list