Roman Lebedev | 819bedf | 2019-03-22 19:46:01 +0000 | [diff] [blame^] | 1 | //===--- OpenMPTidyModule.cpp - clang-tidy--------------------------------===// |
| 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" |
| 11 | #include "../ClangTidyModuleRegistry.h" |
| 12 | |
| 13 | namespace clang { |
| 14 | namespace tidy { |
| 15 | namespace openmp { |
| 16 | |
| 17 | /// This module is for OpenMP-specific checks. |
| 18 | class OpenMPModule : public ClangTidyModule { |
| 19 | public: |
| 20 | void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { |
| 21 | } |
| 22 | }; |
| 23 | |
| 24 | // Register the OpenMPTidyModule using this statically initialized variable. |
| 25 | static ClangTidyModuleRegistry::Add<OpenMPModule> |
| 26 | X("openmp-module", "Adds OpenMP-specific checks."); |
| 27 | |
| 28 | } // namespace openmp |
| 29 | |
| 30 | // This anchor is used to force the linker to link in the generated object file |
| 31 | // and thus register the OpenMPModule. |
| 32 | volatile int OpenMPModuleAnchorSource = 0; |
| 33 | |
| 34 | } // namespace tidy |
| 35 | } // namespace clang |