clang-tools 22.0.0git
ZirconTidyModule.cpp
Go to the documentation of this file.
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//===----------------------------------------------------------------------===//
8
9#include "../ClangTidy.h"
10#include "../ClangTidyModule.h"
13
14namespace clang::tidy {
15namespace zircon {
16
17/// This module is for Zircon-specific checks.
19public:
20 void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
22 "zircon-temporary-objects");
23 }
24};
25
26// Register the ZirconTidyModule using this statically initialized variable.
27static ClangTidyModuleRegistry::Add<ZirconModule>
28 X("zircon-module", "Adds Zircon kernel checks (deprecated in LLVM 24).");
29} // namespace zircon
30
31// This anchor is used to force the linker to link in the generated object file
32// and thus register the ZirconModule.
33volatile int ZirconModuleAnchorSource = 0; // NOLINT(misc-use-internal-linkage)
34
35} // namespace clang::tidy
A collection of ClangTidyCheckFactory instances.
void registerCheck(llvm::StringRef CheckName)
Registers the CheckType with the name Name.
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name.
Construction of specific temporary objects in the Zircon kernel is discouraged.
This module is for Zircon-specific checks.
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override
Implement this function in order to register all CheckFactories belonging to this module.
static ClangTidyModuleRegistry::Add< ZirconModule > X("zircon-module", "Adds Zircon kernel checks (deprecated in LLVM 24).")
volatile int ZirconModuleAnchorSource