clang-tools  6.0.0
NewDeleteOverloadsCheck.h
Go to the documentation of this file.
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 
22  std::map<const clang::CXXRecordDecl *,
23  llvm::SmallVector<const clang::FunctionDecl *, 4>>
24  Overloads;
25 
26 public:
28  : ClangTidyCheck(Name, Context) {}
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
StringHandle Name
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
Base class for all clang-tidy checks.
Definition: ClangTidy.h:127
NewDeleteOverloadsCheck(StringRef Name, ClangTidyContext *Context)
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.