diff options
| author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-05-02 17:49:00 +0000 |
|---|---|---|
| committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2016-05-02 17:49:00 +0000 |
| commit | a54a212d9d1fa68f1da63fc1c5b00e0e15ea6b38 (patch) | |
| tree | 19de4588656643371436ffe0fc782d27103d831a /clang-tools-extra | |
| parent | 0404605dda562b3ba70030014c838f7209e05342 (diff) | |
| download | bcm5719-llvm-a54a212d9d1fa68f1da63fc1c5b00e0e15ea6b38.tar.gz bcm5719-llvm-a54a212d9d1fa68f1da63fc1c5b00e0e15ea6b38.zip | |
[include-fixer] Fix Clang-tidy modernize-use-override and some Include What You Use warnings.
Differential revision: http://reviews.llvm.org/D19755
llvm-svn: 268262
Diffstat (limited to 'clang-tools-extra')
3 files changed, 33 insertions, 7 deletions
diff --git a/clang-tools-extra/include-fixer/IncludeFixer.h b/clang-tools-extra/include-fixer/IncludeFixer.h index 504668a82ef..4d9410b9525 100644 --- a/clang-tools-extra/include-fixer/IncludeFixer.h +++ b/clang-tools-extra/include-fixer/IncludeFixer.h @@ -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, diff --git a/clang-tools-extra/include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp b/clang-tools-extra/include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp index fffbf0b1db6..2ef6fdc04a3 100644 --- a/clang-tools-extra/include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp +++ b/clang-tools-extra/include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp @@ -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); diff --git a/clang-tools-extra/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp b/clang-tools-extra/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp index e5902e6b0f3..ccb74645cf4 100644 --- a/clang-tools-extra/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp +++ b/clang-tools-extra/unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp @@ -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[] = "symbols.h"; class MockReporter : public clang::find_all_symbols::FindAllSymbols::ResultReporter { public: - ~MockReporter() {} + ~MockReporter() override {} void reportResult(llvm::StringRef FileName, const SymbolInfo &Symbol) override { |

