Jonathan Coe | 3032d3c | 2017-02-06 22:57:14 +0000 | [diff] [blame] | 1 | //===--- NoAssemblerCheck.h - clang-tidy-------------------------*- C++ -*-===// |
| 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 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 |
Jonathan Coe | 3032d3c | 2017-02-06 22:57:14 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
Aaron Ballman | dbdbabf | 2017-03-19 17:23:23 +0000 | [diff] [blame] | 9 | #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_NO_ASSEMBLER_H |
| 10 | #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_NO_ASSEMBLER_H |
Jonathan Coe | 3032d3c | 2017-02-06 22:57:14 +0000 | [diff] [blame] | 11 | |
| 12 | #include "../ClangTidy.h" |
| 13 | |
| 14 | namespace clang { |
| 15 | namespace tidy { |
Aaron Ballman | dbdbabf | 2017-03-19 17:23:23 +0000 | [diff] [blame] | 16 | namespace hicpp { |
Jonathan Coe | 3032d3c | 2017-02-06 22:57:14 +0000 | [diff] [blame] | 17 | |
| 18 | /// Find assembler statements. No fix is offered. |
| 19 | /// |
| 20 | /// For the user-facing documentation see: |
Aaron Ballman | dbdbabf | 2017-03-19 17:23:23 +0000 | [diff] [blame] | 21 | /// http://clang.llvm.org/extra/clang-tidy/checks/hicpp-no-assembler.html |
Jonathan Coe | 3032d3c | 2017-02-06 22:57:14 +0000 | [diff] [blame] | 22 | class NoAssemblerCheck : public ClangTidyCheck { |
| 23 | public: |
| 24 | NoAssemblerCheck(StringRef Name, ClangTidyContext *Context) |
| 25 | : ClangTidyCheck(Name, Context) {} |
| 26 | void registerMatchers(ast_matchers::MatchFinder *Finder) override; |
| 27 | void check(const ast_matchers::MatchFinder::MatchResult &Result) override; |
| 28 | }; |
| 29 | |
Aaron Ballman | dbdbabf | 2017-03-19 17:23:23 +0000 | [diff] [blame] | 30 | } // namespace hicpp |
Jonathan Coe | 3032d3c | 2017-02-06 22:57:14 +0000 | [diff] [blame] | 31 | } // namespace tidy |
| 32 | } // namespace clang |
| 33 | |
Aaron Ballman | dbdbabf | 2017-03-19 17:23:23 +0000 | [diff] [blame] | 34 | #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_HICPP_NO_ASSEMBLER_H |