diff options
| author | Fangrui Song <maskray@google.com> | 2018-03-07 16:57:42 +0000 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2018-03-07 16:57:42 +0000 |
| commit | c0e768df9050133466695f3a8f3bf0b3bb343987 (patch) | |
| tree | aad316119c855a577b253781dea5f541b2f778df /clang-tools-extra/clang-tidy/portability/PortabilityTidyModule.cpp | |
| parent | eccfbf1bcdea5d69ccdc7b568392054ccda1403e (diff) | |
| download | bcm5719-llvm-c0e768df9050133466695f3a8f3bf0b3bb343987.tar.gz bcm5719-llvm-c0e768df9050133466695f3a8f3bf0b3bb343987.zip | |
[clang-tidy] Add "portability" module and rename readability-simd-intrinsics to portability-simd-intrinsics
Reviewers: alexfh
Subscribers: klimek, nemanjai, mgorny, xazax.hun, kbarton, cfe-commits
Differential Revision: https://reviews.llvm.org/D44173
llvm-svn: 326909
Diffstat (limited to 'clang-tools-extra/clang-tidy/portability/PortabilityTidyModule.cpp')
| -rw-r--r-- | clang-tools-extra/clang-tidy/portability/PortabilityTidyModule.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/portability/PortabilityTidyModule.cpp b/clang-tools-extra/clang-tidy/portability/PortabilityTidyModule.cpp new file mode 100644 index 00000000000..013cbcfeae9 --- /dev/null +++ b/clang-tools-extra/clang-tidy/portability/PortabilityTidyModule.cpp @@ -0,0 +1,38 @@ +//===--- PortabilityTidyModule.cpp - clang-tidy ---------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "../ClangTidy.h" +#include "../ClangTidyModule.h" +#include "../ClangTidyModuleRegistry.h" +#include "SIMDIntrinsicsCheck.h" + +namespace clang { +namespace tidy { +namespace portability { + +class PortabilityModule : public ClangTidyModule { +public: + void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { + CheckFactories.registerCheck<SIMDIntrinsicsCheck>( + "portability-simd-intrinsics"); + } +}; + +// Register the PortabilityModule using this statically initialized variable. +static ClangTidyModuleRegistry::Add<PortabilityModule> + X("portability-module", "Adds portability-related checks."); + +} // namespace portability + +// This anchor is used to force the linker to link in the generated object file +// and thus register the PortabilityModule. +volatile int PortabilityModuleAnchorSource = 0; + +} // namespace tidy +} // namespace clang |

