clang-tools  7.0.0
AbseilTidyModule.cpp
Go to the documentation of this file.
1 //===------- AbseilTidyModule.cpp - clang-tidy ----------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "../ClangTidy.h"
11 #include "../ClangTidyModule.h"
12 #include "../ClangTidyModuleRegistry.h"
14 
15 namespace clang {
16 namespace tidy {
17 namespace abseil {
18 
19 class AbseilModule : public ClangTidyModule {
20 public:
21  void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
23  "abseil-string-find-startswith");
24  }
25 };
26 
27 // Register the AbseilModule using this statically initialized variable.
28 static ClangTidyModuleRegistry::Add<AbseilModule> X("abseil-module",
29  "Add Abseil checks.");
30 
31 } // namespace abseil
32 
33 // This anchor is used to force the linker to link in the generated object file
34 // and thus register the AbseilModule.
35 volatile int AbseilModuleAnchorSource = 0;
36 
37 } // namespace tidy
38 } // namespace clang
void registerCheck(StringRef CheckName)
Registers the CheckType with the name Name.
A collection of ClangTidyCheckFactory instances.
static ClangTidyModuleRegistry::Add< AbseilModule > X("abseil-module", "Add Abseil checks.")
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name.
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override
Implement this function in order to register all CheckFactories belonging to this module...
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
volatile int AbseilModuleAnchorSource