[clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D82661
This commit is contained in:
Nathan James 2020-06-29 16:05:51 +01:00
parent 1cf2e45c19
commit 860aefd078
No known key found for this signature in database
GPG Key ID: CC007AFCDA90AA5F
103 changed files with 135 additions and 88 deletions

View File

@ -15,6 +15,7 @@
//===----------------------------------------------------------------------===//
#include "ClangTidy.h"
#include "ClangTidyCheck.h"
#include "ClangTidyDiagnosticConsumer.h"
#include "ClangTidyModuleRegistry.h"
#include "ClangTidyProfiling.h"

View File

@ -9,19 +9,22 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDY_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDY_H
#include "ClangTidyCheck.h"
#include "ClangTidyDiagnosticConsumer.h"
#include "ClangTidyOptions.h"
#include "llvm/Support/raw_ostream.h"
#include <memory>
#include <vector>
namespace llvm {
class raw_ostream;
} // namespace llvm
namespace clang {
class ASTConsumer;
class CompilerInstance;
namespace tooling {
class CompilationDatabase;
}
} // namespace tooling
namespace tidy {

View File

@ -13,17 +13,16 @@
#include "ClangTidyOptions.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Error.h"
#include <memory>
#include <type_traits>
#include <utility>
#include <vector>
namespace clang {
class CompilerInstance;
class SourceManager;
namespace tidy {

View File

@ -18,16 +18,21 @@
#include "ClangTidyDiagnosticConsumer.h"
#include "ClangTidyOptions.h"
#include "GlobList.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTDiagnostic.h"
#include "clang/AST/Attr.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/DiagnosticRenderer.h"
#include "clang/Tooling/Core/Diagnostic.h"
#include "clang/Tooling/Core/Replacement.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/Regex.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Regex.h"
#include <tuple>
#include <vector>
using namespace clang;

View File

@ -12,12 +12,8 @@
#include "ClangTidyOptions.h"
#include "ClangTidyProfiling.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Tooling/Core/Diagnostic.h"
#include "clang/Tooling/Refactoring.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/Timer.h"
namespace llvm {
class Regex;
@ -27,6 +23,7 @@ namespace clang {
class ASTContext;
class CompilerInstance;
class SourceManager;
namespace ast_matchers {
class MatchFinder;
}

View File

@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//
#include "ClangTidyModule.h"
#include "ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,17 +9,20 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYMODULE_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYMODULE_H
#include "ClangTidy.h"
#include "ClangTidyOptions.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include <functional>
#include <map>
#include <memory>
#include <string>
#include <utility>
namespace clang {
namespace tidy {
class ClangTidyCheck;
class ClangTidyContext;
/// A collection of \c ClangTidyCheckFactory instances.
///
/// All clang-tidy modules register their check factories with an instance of
@ -27,12 +30,12 @@ namespace tidy {
class ClangTidyCheckFactories {
public:
using CheckFactory = std::function<std::unique_ptr<ClangTidyCheck>(
StringRef Name, ClangTidyContext *Context)>;
llvm::StringRef Name, ClangTidyContext *Context)>;
/// Registers check \p Factory with name \p Name.
///
/// For all checks that have default constructors, use \c registerCheck.
void registerCheckFactory(StringRef Name, CheckFactory Factory);
void registerCheckFactory(llvm::StringRef Name, CheckFactory Factory);
/// Registers the \c CheckType with the name \p Name.
///
@ -55,9 +58,9 @@ public:
/// }
/// };
/// \endcode
template <typename CheckType> void registerCheck(StringRef CheckName) {
template <typename CheckType> void registerCheck(llvm::StringRef CheckName) {
registerCheckFactory(CheckName,
[](StringRef Name, ClangTidyContext *Context) {
[](llvm::StringRef Name, ClangTidyContext *Context) {
return std::make_unique<CheckType>(Name, Context);
});
}

View File

@ -13,10 +13,11 @@
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/Chrono.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/raw_ostream.h"
#include <string>
#include <utility>
#include <vector>
namespace llvm {
class raw_ostream;
} // namespace llvm
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMEADDITIONCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMEADDITIONCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONCOMPARISONCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONCOMPARISONCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONCONVERSIONCASTCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONCONVERSIONCASTCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,6 +9,7 @@
#include "DurationDivisionCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONDIVISIONCHECK_H_
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONDIVISIONCHECK_H_
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -10,6 +10,7 @@
#include "DurationRewriter.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
#include "clang/Tooling/FixIt.h"
using namespace clang::ast_matchers;

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONFACTORYFLOATCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONFACTORYFLOATCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONFACTORYSCALECHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONFACTORYSCALECHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONSUBTRACTIONCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_DURATIONSUBTRACTIONCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMEDOUBLECONVERSIONCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMEDOUBLECONVERSIONCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_FASTERSTRSPLITDELIMITERCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_FASTERSTRSPLITDELIMITERCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_NOINTERNALDEPSCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_NOINTERNALDEPSCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_NONAMESPACECHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_NONAMESPACECHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_REDUNDANTSTRCATCALLSCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_REDUNDANTSTRCATCALLSCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_STRCATAPPENDCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_STRCATAPPENDCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -12,8 +12,8 @@
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Frontend/CompilerInstance.h"
#include <cassert>
#include "clang/Lex/Lexer.h"
#include "clang/Lex/Preprocessor.h"
using namespace clang::ast_matchers;

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_STRINGFINDSTARTSWITHCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_STRINGFINDSTARTSWITHCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
#include "../utils/IncludeInserter.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_STRINGFINDSTRCONTAINSCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_STRINGFINDSTRCONTAINSCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
#include "../utils/TransformerClangTidyCheck.h"
namespace clang {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMECOMPARECHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMECOMPARECHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -10,6 +10,7 @@
#include "DurationRewriter.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
#include "clang/Tooling/FixIt.h"
using namespace clang::ast_matchers;

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMESUBTRACTIONCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_TIMESUBTRACTIONCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -10,6 +10,7 @@
#include "DurationRewriter.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_UPGRADEDURATIONCONVERSIONSCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_ABSEIL_UPGRADEDURATIONCONVERSIONSCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
#include <unordered_set>

View File

@ -9,6 +9,7 @@
#include "BadSignalToKillThreadCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Preprocessor.h"
using namespace clang::ast_matchers;

View File

@ -11,6 +11,7 @@
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Analysis/CloneDetection.h"
#include "clang/Lex/Lexer.h"
#include "llvm/Support/Casting.h"
using namespace clang;

View File

@ -10,7 +10,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_BRANCHCLONECHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_BRANCHCLONECHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,6 +9,7 @@
#include "MisplacedOperatorInStrlenInAllocCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;

View File

@ -9,6 +9,7 @@
#include "MisplacedPointerArithmeticInAllocCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;

View File

@ -12,6 +12,7 @@
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/Lexer.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
using namespace clang::ast_matchers;

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_NOT_NULL_TERMINATED_RESULT_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_NOT_NULL_TERMINATED_RESULT_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -10,6 +10,7 @@
#include "../utils/Matchers.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;

View File

@ -11,6 +11,7 @@
#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Token.h"
#include <algorithm>
#include <cctype>

View File

@ -8,6 +8,7 @@
#include "SuspiciousIncludeCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/Lex/Preprocessor.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_AVOIDGOTOCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_AVOIDGOTOCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -10,6 +10,8 @@
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
using namespace clang::ast_matchers;

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_INTERFACES_GLOBAL_INIT_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_INTERFACES_GLOBAL_INIT_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,6 +9,7 @@
#include "MacroUsageCheck.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Regex.h"
#include <algorithm>

View File

@ -9,11 +9,12 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_MACROUSAGECHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_MACROUSAGECHECK_H
#include "../ClangTidy.h"
#include "clang/Lex/Preprocessor.h"
#include "../ClangTidyCheck.h"
#include "clang/Lex/MacroInfo.h"
#include <string>
namespace clang {
class MacroDirective;
namespace tidy {
namespace cppcoreguidelines {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_NARROWING_CONVERSIONS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_NARROWING_CONVERSIONS_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,9 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_NO_MALLOC_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_NO_MALLOC_H
#include "../ClangTidy.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_OWNING_MEMORY_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_OWNING_MEMORY_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_BOUNDS_ARRAY_TO_POINTER_DECAY_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_BOUNDS_ARRAY_TO_POINTER_DECAY_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_BOUNDS_CONSTANT_ARRAY_INDEX_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_BOUNDS_CONSTANT_ARRAY_INDEX_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
#include "../utils/IncludeInserter.h"
namespace clang {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_BOUNDS_POINTER_ARITHMETIC_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_BOUNDS_POINTER_ARITHMETIC_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_CONST_CAST_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_CONST_CAST_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_CSTYLE_CAST_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_CSTYLE_CAST_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_MEMBER_INIT_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_MEMBER_INIT_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_REINTERPRETCAST_CHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_REINTERPRETCAST_CHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_STATIC_CAST_DOWNCAST_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_STATIC_CAST_DOWNCAST_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_UNION_ACCESS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_UNION_ACCESS_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_VARARG_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_PRO_TYPE_VARARG_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_SLICING_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_SLICING_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_SPECIAL_MEMBER_FUNCTIONS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CPPCOREGUIDELINES_SPECIAL_MEMBER_FUNCTIONS_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
#include "llvm/ADT/DenseMapInfo.h"

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "DefaultArgumentsDeclarationsCheck.h"
#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;

View File

@ -12,6 +12,7 @@
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Lexer.h"
#include "llvm/Support/FormatVariadic.h"
#include <map>
#include <string>

View File

@ -13,6 +13,8 @@
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/MacroArgs.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
namespace clang {
namespace tidy {

View File

@ -9,6 +9,8 @@
#include "UpgradeGoogletestCaseCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
using namespace clang::ast_matchers;

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_EXCEPTION_BASECLASS_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_EXCEPTION_BASECLASS_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,9 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_MULTIWAY_PATHS_COVERED_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_MULTIWAY_PATHS_COVERED_H
#include "../ClangTidy.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include <iostream>
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_NO_ASSEMBLER_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_NO_ASSEMBLER_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_SIGNED_BITWISE_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_SIGNED_BITWISE_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "HeaderGuardCheck.h"
#include "clang/Tooling/Tooling.h"
namespace clang {
namespace tidy {

View File

@ -10,6 +10,7 @@
#include "PreferIsaOrDynCastInConditionalsCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;

View File

@ -11,6 +11,7 @@
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/HeaderSearchOptions.h"
#include "clang/Lex/Preprocessor.h"
// FixItHint - Hint to check documentation script to mark this check as
// providing a FixIt.

View File

@ -13,6 +13,7 @@
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/STLExtras.h"
#include <unordered_map>
#include <unordered_set>
using namespace clang::ast_matchers;

View File

@ -18,6 +18,7 @@
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Regex.h"
@ -255,7 +256,7 @@ static SmallVector<BindArgument, 4>
buildBindArguments(const MatchFinder::MatchResult &Result,
const CallableInfo &Callable) {
SmallVector<BindArgument, 4> BindArguments;
llvm::Regex MatchPlaceholder("^_([0-9]+)$");
static llvm::Regex MatchPlaceholder("^_([0-9]+)$");
const auto *BindCall = Result.Nodes.getNodeAs<CallExpr>("bind");

View File

@ -9,8 +9,8 @@
#include "ConcatNestedNamespacesCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
#include <algorithm>
#include <iterator>
namespace clang {
namespace tidy {

View File

@ -9,6 +9,8 @@
#include "ReplaceDisallowCopyAndAssignMacroCheck.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/MacroArgs.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/Support/FormatVariadic.h"
namespace clang {

View File

@ -11,6 +11,7 @@
#include "clang/AST/ASTContext.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Tooling/FixIt.h"
#include "llvm/ADT/StringExtras.h"

View File

@ -10,7 +10,8 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USETRAILINGRETURNTYPECHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_USETRAILINGRETURNTYPECHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
#include "clang/Lex/Token.h"
namespace clang {
namespace tidy {

View File

@ -9,6 +9,7 @@
#include "UseUncaughtExceptionsCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;

View File

@ -8,7 +8,6 @@
#include "NSInvocationArgumentLifetimeCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attrs.inc"
#include "clang/AST/ComputeDependence.h"
#include "clang/AST/Decl.h"
#include "clang/AST/Expr.h"
@ -23,10 +22,10 @@
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/raw_ostream.h"
using namespace clang::ast_matchers;

View File

@ -10,7 +10,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_SUPERSELFCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OBJC_SUPERSELFCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OPENMP_EXCEPTIONESCAPECHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OPENMP_EXCEPTIONESCAPECHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
#include "../utils/ExceptionAnalyzer.h"
namespace clang {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OPENMP_USEDEFAULTNONECHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_OPENMP_USEDEFAULTNONECHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,6 +9,7 @@
#include "NoexceptMoveConstructorCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
#include "clang/Tooling/FixIt.h"
using namespace clang::ast_matchers;

View File

@ -11,6 +11,7 @@
#include "../ClangTidyCheck.h"
#include "../GlobList.h"
#include "clang/Lex/PPCallbacks.h"
namespace clang {
namespace tidy {

View File

@ -13,6 +13,7 @@
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;

View File

@ -10,7 +10,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONVERTMEMFUNCTOSTATIC_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_CONVERTMEMFUNCTOSTATIC_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
namespace clang {
namespace tidy {

View File

@ -9,6 +9,7 @@
#include "ElseAfterReturnCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
#include "clang/Tooling/FixIt.h"
#include "llvm/ADT/SmallVector.h"

View File

@ -10,9 +10,9 @@
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_MAGICNUMBERSCHECK_H
#include "../ClangTidyCheck.h"
#include "clang/Lex/Lexer.h"
#include <llvm/ADT/APFloat.h>
#include <llvm/ADT/SmallVector.h>
#include <vector>
namespace clang {
namespace tidy {

View File

@ -11,6 +11,7 @@
#include "clang/AST/ParentMapContext.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;

View File

@ -8,6 +8,9 @@
#include "RedundantPreprocessorCheck.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/Lexer.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
namespace clang {
namespace tidy {

View File

@ -8,9 +8,9 @@
#include "UppercaseLiteralSuffixCheck.h"
#include "../utils/ASTUtils.h"
#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallString.h"

View File

@ -10,7 +10,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_USEALGORITHMCHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_USEALGORITHMCHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
#include "../utils/IncludeInserter.h"
namespace clang {

View File

@ -25,8 +25,6 @@
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/WithColor.h"
using namespace clang::ast_matchers;
using namespace clang::driver;
using namespace clang::tooling;
using namespace llvm;

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "ExprSequence.h"
#include "clang/AST/ParentMapContext.h"
namespace clang {
namespace tidy {

View File

@ -9,7 +9,7 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_HEADERGUARD_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_HEADERGUARD_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
#include "../utils/FileExtensionsUtils.h"
namespace clang {

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "IncludeSorter.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Lexer.h"
namespace clang {

View File

@ -12,6 +12,7 @@
#include "../ClangTidyCheck.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/FunctionExtras.h"
#include "llvm/ADT/Optional.h"
#include <string>
#include <utility>

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "TransformerClangTidyCheck.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/STLExtras.h"
namespace clang {

View File

@ -9,14 +9,11 @@
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_TRANSFORMER_CLANG_TIDY_CHECK_H
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_TRANSFORMER_CLANG_TIDY_CHECK_H
#include "../ClangTidy.h"
#include "../ClangTidyCheck.h"
#include "IncludeInserter.h"
#include "IncludeSorter.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Tooling/Transformer/Transformer.h"
#include <deque>
#include <vector>
namespace clang {
namespace tidy {

Some files were not shown because too many files have changed in this diff Show More