-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathAliceO2TidyModule.cpp
More file actions
53 lines (44 loc) · 1.77 KB
/
Copy pathAliceO2TidyModule.cpp
File metadata and controls
53 lines (44 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//===--- AliceO2TidyModule.cpp - clang-tidy ----------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "clang-tidy/ClangTidy.h"
#include "clang-tidy/ClangTidyModule.h"
// Up to Clang 21 ClangTidyModuleRegistry was declared only in
// ClangTidyModuleRegistry.h. Clang 22 moved it into ClangTidyModule.h above and
// left the old header behind as a bare #warning, to be deleted in Clang 24 --
// so __has_include() would keep including it, and keep warning, on 22 and 23.
#include "llvm/Config/llvm-config.h"
#if LLVM_VERSION_MAJOR < 22
#include "clang-tidy/ClangTidyModuleRegistry.h"
#endif
#include "MemberNamesCheck.h"
#include "NamespaceNamingCheck.h"
#include "SizeofCheck.h"
namespace clang {
namespace tidy {
namespace aliceO2 {
class AliceO2Module : public ClangTidyModule {
public:
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
CheckFactories.registerCheck<MemberNamesCheck>(
"aliceO2-member-name");
CheckFactories.registerCheck<NamespaceNamingCheck>(
"aliceO2-namespace-naming");
CheckFactories.registerCheck<SizeofCheck>(
"aliceO2-SizeOf");
}
};
} // namespace aliceO2
// Register the AliceO2TidyModule using this statically initialized variable.
static ClangTidyModuleRegistry::Add<aliceO2::AliceO2Module> X("aliceO2-module",
"Adds AliceO2 specific checks");
// This anchor is used to force the linker to link in the generated object file
// and thus register the AliceO2Module.
volatile int AliceO2ModuleAnchorSource = 0;
} // namespace tidy
} // namespace clang