blob: 28eb1d656b07c23a5cbfda9dd238ed8bd9f17c88 [file] [log] [blame]
Piotr Padlewski5625f652016-04-29 17:58:29 +00001//===------- BoostTidyModule.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"
13#include "UseToStringCheck.h"
14using namespace clang::ast_matchers;
15
16namespace clang {
17namespace tidy {
18namespace boost {
19
20class BoostModule : public ClangTidyModule {
21public:
22 void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
23 CheckFactories.registerCheck<UseToStringCheck>("boost-use-to-string");
24 }
25};
26
27// Register the BoostModule using this statically initialized variable.
28static ClangTidyModuleRegistry::Add<BoostModule> X("boost-module",
29 "Add boost checks.");
30
31} // namespace boost
32
33// This anchor is used to force the linker to link in the generated object file
34// and thus register the BoostModule.
35volatile int BoostModuleAnchorSource = 0;
36
37} // namespace tidy
38} // namespace clang