//===----------------------------------------------------------------------===//
#include "ClangTidy.h"
+#include "ClangTidyCheck.h"
#include "ClangTidyDiagnosticConsumer.h"
#include "ClangTidyModuleRegistry.h"
#include "ClangTidyProfiling.h"
#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 {
#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 {
#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;
#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;
class ASTContext;
class CompilerInstance;
+class SourceManager;
namespace ast_matchers {
class MatchFinder;
}
//===----------------------------------------------------------------------===//
#include "ClangTidyModule.h"
+#include "ClangTidyCheck.h"
namespace clang {
namespace tidy {
#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
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.
///
/// }
/// };
/// \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);
});
}
#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 {
#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 {
#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 {
#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 {
#include "DurationDivisionCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/Lex/Lexer.h"
namespace clang {
namespace tidy {
#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 {
#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;
#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 {
#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 {
#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 {
#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 {
#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 {
#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 {
#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 {
#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 {
#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 {
#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;
#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"
#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 {
#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 {
#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;
#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 {
#include "DurationRewriter.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;
#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>
#include "BadSignalToKillThreadCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/Lex/Preprocessor.h"
using namespace clang::ast_matchers;
#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;
#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 {
#include "MisplacedOperatorInStrlenInAllocCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;
#include "MisplacedPointerArithmeticInAllocCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;
#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;
#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 {
#include "../utils/Matchers.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;
#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/Lex/Token.h"
#include <algorithm>
#include <cctype>
#include "SuspiciousIncludeCheck.h"
#include "clang/AST/ASTContext.h"
+#include "clang/Lex/Preprocessor.h"
namespace clang {
namespace tidy {
#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 {
#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;
#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 {
#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>
#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 {
#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 {
#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 {
#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 {
#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 {
#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 {
#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 {
#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 {
#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 {
#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 {
#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 {
#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 {
#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 {
#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 {
#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 {
#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"
//===----------------------------------------------------------------------===//
#include "DefaultArgumentsDeclarationsCheck.h"
+#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;
#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>
#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 {
#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;
#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 {
#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 {
#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 {
#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 {
//===----------------------------------------------------------------------===//
#include "HeaderGuardCheck.h"
+#include "clang/Tooling/Tooling.h"
namespace clang {
namespace tidy {
#include "PreferIsaOrDynCastInConditionalsCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;
#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.
#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;
#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"
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");
#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 {
#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 {
#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"
#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 {
#include "UseUncaughtExceptionsCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "clang/Lex/Lexer.h"
using namespace clang::ast_matchers;
#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"
#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;
#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 {
#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 {
#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 {
#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;
#include "../ClangTidyCheck.h"
#include "../GlobList.h"
+#include "clang/Lex/PPCallbacks.h"
namespace clang {
namespace tidy {
#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;
#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 {
#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"
#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 {
#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;
#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 {
#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"
#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 {
#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;
//===----------------------------------------------------------------------===//
#include "ExprSequence.h"
+#include "clang/AST/ParentMapContext.h"
namespace clang {
namespace tidy {
#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 {
//===----------------------------------------------------------------------===//
#include "IncludeSorter.h"
+#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Lexer.h"
namespace clang {
#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>
//===----------------------------------------------------------------------===//
#include "TransformerClangTidyCheck.h"
+#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/STLExtras.h"
namespace clang {
#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 {
//===----------------------------------------------------------------------===//
#include "ParsedAST.h"
+#include "../clang-tidy/ClangTidyCheck.h"
#include "../clang-tidy/ClangTidyDiagnosticConsumer.h"
#include "../clang-tidy/ClangTidyModuleRegistry.h"
#include "AST.h"
//
//===----------------------------------------------------------------------===//
+#include "../../clang-tidy/ClangTidyCheck.h"
#include "../../clang-tidy/ClangTidyModule.h"
#include "../../clang-tidy/ClangTidyModuleRegistry.h"
#include "AST.h"
#define LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANG_TIDY_CLANGTIDYTEST_H
#include "ClangTidy.h"
+#include "ClangTidyCheck.h"
#include "ClangTidyDiagnosticConsumer.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Frontend/CompilerInstance.h"