Skip to content

Commit 05bc055

Browse files
davidrohrpzhristov
andauthored
Bump to Clang 11 (#36)
* Bump to Clang 11 * Update ClangTidyMain.cpp Restore the main function. * Update CMakeLists.txt Adding clangTidyLLVMLibcModule as suggested by @aeroknin Co-authored-by: Peter Hristov <pzhristov@users.noreply.github.com>
1 parent b9e9684 commit 05bc055

15 files changed

+605
-190
lines changed

ClangTidy.h

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,22 @@
99
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDY_H
1010
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDY_H
1111

12-
#include "ClangTidyCheck.h"
1312
#include "ClangTidyDiagnosticConsumer.h"
1413
#include "ClangTidyOptions.h"
15-
#include "llvm/Support/raw_ostream.h"
1614
#include <memory>
1715
#include <vector>
1816

17+
namespace llvm {
18+
class raw_ostream;
19+
} // namespace llvm
20+
1921
namespace clang {
2022

23+
class ASTConsumer;
2124
class CompilerInstance;
2225
namespace tooling {
2326
class CompilationDatabase;
24-
}
27+
} // namespace tooling
2528

2629
namespace tidy {
2730

@@ -33,14 +36,14 @@ class ClangTidyASTConsumerFactory {
3336
ClangTidyContext &Context,
3437
IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem> OverlayFS = nullptr);
3538

36-
/// \brief Returns an ASTConsumer that runs the specified clang-tidy checks.
39+
/// Returns an ASTConsumer that runs the specified clang-tidy checks.
3740
std::unique_ptr<clang::ASTConsumer>
3841
CreateASTConsumer(clang::CompilerInstance &Compiler, StringRef File);
3942

40-
/// \brief Get the list of enabled checks.
43+
/// Get the list of enabled checks.
4144
std::vector<std::string> getCheckNames();
4245

43-
/// \brief Get the union of options from all checks.
46+
/// Get the union of options from all checks.
4447
ClangTidyOptions::OptionMap getCheckOptions();
4548

4649
private:
@@ -49,12 +52,12 @@ class ClangTidyASTConsumerFactory {
4952
std::unique_ptr<ClangTidyCheckFactories> CheckFactories;
5053
};
5154

52-
/// \brief Fills the list of check names that are enabled when the provided
55+
/// Fills the list of check names that are enabled when the provided
5356
/// filters are applied.
5457
std::vector<std::string> getCheckNames(const ClangTidyOptions &Options,
5558
bool AllowEnablingAnalyzerAlphaCheckers);
5659

57-
/// \brief Returns the effective check-specific options.
60+
/// Returns the effective check-specific options.
5861
///
5962
/// The method configures ClangTidy with the specified \p Options and collects
6063
/// effective options from all created checks. The returned set of options
@@ -64,7 +67,7 @@ ClangTidyOptions::OptionMap
6467
getCheckOptions(const ClangTidyOptions &Options,
6568
bool AllowEnablingAnalyzerAlphaCheckers);
6669

67-
/// \brief Run a set of clang-tidy checks on a set of files.
70+
/// Run a set of clang-tidy checks on a set of files.
6871
///
6972
/// \param EnableCheckProfile If provided, it enables check profile collection
7073
/// in MatchFinder, and will contain the result of the profile.
@@ -82,15 +85,15 @@ runClangTidy(clang::tidy::ClangTidyContext &Context,
8285
// FIXME: This interface will need to be significantly extended to be useful.
8386
// FIXME: Implement confidence levels for displaying/fixing errors.
8487
//
85-
/// \brief Displays the found \p Errors to the users. If \p Fix is true, \p
88+
/// Displays the found \p Errors to the users. If \p Fix is true, \p
8689
/// Errors containing fixes are automatically applied and reformatted. If no
8790
/// clang-format configuration file is found, the given \P FormatStyle is used.
8891
void handleErrors(llvm::ArrayRef<ClangTidyError> Errors,
8992
ClangTidyContext &Context, bool Fix,
9093
unsigned &WarningsAsErrorsCount,
9194
llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> BaseFS);
9295

93-
/// \brief Serializes replacements into YAML and writes them to the specified
96+
/// Serializes replacements into YAML and writes them to the specified
9497
/// output stream.
9598
void exportReplacements(StringRef MainFilePath,
9699
const std::vector<ClangTidyError> &Errors,

0 commit comments

Comments
 (0)