[clang][Driver] Support simplified triple versions for config files (#111387)
[llvm-project.git] / libcxx / test / tools / clang_tidy_checks / libcpp_module.cpp
blob54beed5e30be58f912803c321bd50b38e692069c
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "clang-tidy/ClangTidyModule.h"
10 #include "clang-tidy/ClangTidyModuleRegistry.h"
12 #include "abi_tag_on_virtual.hpp"
13 #include "header_exportable_declarations.hpp"
14 #include "hide_from_abi.hpp"
15 #include "internal_ftm_use.hpp"
16 #include "proper_version_checks.hpp"
17 #include "qualify_declval.hpp"
18 #include "robust_against_adl.hpp"
19 #include "uglify_attributes.hpp"
21 namespace {
22 class LibcxxTestModule : public clang::tidy::ClangTidyModule {
23 public:
24 void addCheckFactories(clang::tidy::ClangTidyCheckFactories& check_factories) override {
25 check_factories.registerCheck<libcpp::abi_tag_on_virtual>("libcpp-avoid-abi-tag-on-virtual");
26 check_factories.registerCheck<libcpp::header_exportable_declarations>("libcpp-header-exportable-declarations");
27 check_factories.registerCheck<libcpp::hide_from_abi>("libcpp-hide-from-abi");
28 check_factories.registerCheck<libcpp::internal_ftm_use>("libcpp-internal-ftms");
29 check_factories.registerCheck<libcpp::proper_version_checks>("libcpp-cpp-version-check");
30 check_factories.registerCheck<libcpp::robust_against_adl_check>("libcpp-robust-against-adl");
31 check_factories.registerCheck<libcpp::uglify_attributes>("libcpp-uglify-attributes");
32 check_factories.registerCheck<libcpp::qualify_declval>("libcpp-qualify-declval");
35 } // namespace
37 clang::tidy::ClangTidyModuleRegistry::Add<LibcxxTestModule> libcpp_module{
38 "libcpp-module", "Adds libc++-specific checks."};