Aaron Ballman | de34985 | 2015-09-29 13:12:21 +0000 | [diff] [blame] | 1 | //===--- NewDeleteOverloadsCheck.h - 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 | #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_NEWDELETEOVERLOADS_H |
| 11 | #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_NEWDELETEOVERLOADS_H |
| 12 | |
| 13 | #include "../ClangTidy.h" |
| 14 | #include "llvm/ADT/SmallVector.h" |
| 15 | #include <map> |
| 16 | |
| 17 | namespace clang { |
| 18 | namespace tidy { |
| 19 | namespace misc { |
| 20 | |
| 21 | class NewDeleteOverloadsCheck : public ClangTidyCheck { |
| 22 | std::map<const clang::CXXRecordDecl *, |
Mandeep Singh Grang | 7c7ea7d | 2016-11-08 07:50:19 +0000 | [diff] [blame] | 23 | llvm::SmallVector<const clang::FunctionDecl *, 4>> |
| 24 | Overloads; |
Aaron Ballman | de34985 | 2015-09-29 13:12:21 +0000 | [diff] [blame] | 25 | |
| 26 | public: |
| 27 | NewDeleteOverloadsCheck(StringRef Name, ClangTidyContext *Context) |
Mandeep Singh Grang | 7c7ea7d | 2016-11-08 07:50:19 +0000 | [diff] [blame] | 28 | : ClangTidyCheck(Name, Context) {} |
Aaron Ballman | de34985 | 2015-09-29 13:12:21 +0000 | [diff] [blame] | 29 | void registerMatchers(ast_matchers::MatchFinder *Finder) override; |
| 30 | void check(const ast_matchers::MatchFinder::MatchResult &Result) override; |
| 31 | void onEndOfTranslationUnit() override; |
| 32 | }; |
| 33 | |
| 34 | } // namespace misc |
| 35 | } // namespace tidy |
| 36 | } // namespace clang |
| 37 | |
| 38 | #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_NEWDELETEOVERLOADS_H |