brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 2cf39e2 Raw
42 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9#include "clang-tidy/ClangTidyModule.h"10#include "clang-tidy/ClangTidyModuleRegistry.h"11 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 "nodebug_on_aliases.hpp"17#include "proper_version_checks.hpp"18#include "robust_against_adl.hpp"19#include "robust_against_operator_ampersand.hpp"20#include "uglify_attributes.hpp"21 22namespace {23class LibcxxTestModule : public clang::tidy::ClangTidyModule {24public:25  void addCheckFactories(clang::tidy::ClangTidyCheckFactories& check_factories) override {26    check_factories.registerCheck<libcpp::abi_tag_on_virtual>("libcpp-avoid-abi-tag-on-virtual");27    check_factories.registerCheck<libcpp::header_exportable_declarations>("libcpp-header-exportable-declarations");28    check_factories.registerCheck<libcpp::hide_from_abi>("libcpp-hide-from-abi");29    check_factories.registerCheck<libcpp::internal_ftm_use>("libcpp-internal-ftms");30    check_factories.registerCheck<libcpp::nodebug_on_aliases>("libcpp-nodebug-on-aliases");31    check_factories.registerCheck<libcpp::proper_version_checks>("libcpp-cpp-version-check");32    check_factories.registerCheck<libcpp::robust_against_adl_check>("libcpp-robust-against-adl");33    check_factories.registerCheck<libcpp::robust_against_operator_ampersand>(34        "libcpp-robust-against-operator-ampersand");35    check_factories.registerCheck<libcpp::uglify_attributes>("libcpp-uglify-attributes");36  }37};38} // namespace39 40clang::tidy::ClangTidyModuleRegistry::Add<LibcxxTestModule> libcpp_module{41    "libcpp-module", "Adds libc++-specific checks."};42