clang-tools  8.0.0
PortabilityTidyModule.cpp
Go to the documentation of this file.
1 //===--- PortabilityTidyModule.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 "SIMDIntrinsicsCheck.h"
14 
15 namespace clang {
16 namespace tidy {
17 namespace portability {
18 
20 public:
21  void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
22  CheckFactories.registerCheck<SIMDIntrinsicsCheck>(
23  "portability-simd-intrinsics");
24  }
25 };
26 
27 // Register the PortabilityModule using this statically initialized variable.
28 static ClangTidyModuleRegistry::Add<PortabilityModule>
29  X("portability-module", "Adds portability-related checks.");
30 
31 } // namespace portability
32 
33 // This anchor is used to force the linker to link in the generated object file
34 // and thus register the PortabilityModule.
36 
37 } // namespace tidy
38 } // namespace clang
void registerCheck(StringRef CheckName)
Registers the CheckType with the name Name.
A collection of ClangTidyCheckFactory instances.
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override
Implement this function in order to register all CheckFactories belonging to this module...
A clang-tidy module groups a number of ClangTidyChecks and gives them a prefixed name.
volatile int PortabilityModuleAnchorSource
Find SIMD intrinsics calls and suggest std::experimental::simd alternatives.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
static ClangTidyModuleRegistry::Add< PortabilityModule > X("portability-module", "Adds portability-related checks.")