forked from andreasfertig/cppinsights
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunctionDeclHandler.h
More file actions
33 lines (27 loc) · 1.18 KB
/
FunctionDeclHandler.h
File metadata and controls
33 lines (27 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/******************************************************************************
*
* C++ Insights, copyright (C) by Andreas Fertig
* Distributed under an MIT license. See LICENSE for details
*
****************************************************************************/
#ifndef INSIGHTS_FUNCTION_DECL_HANDLER_H
#define INSIGHTS_FUNCTION_DECL_HANDLER_H
#include "InsightsBase.h" // for InsightsBase
#include "clang/ASTMatchers/ASTMatchFinder.h" // for MatchFinder, MatchFind...
namespace clang {
class Rewriter;
}
//-----------------------------------------------------------------------------
namespace clang::insights {
/// \brief Match function decls
///
/// To get a broader rewrite of statements match the entire function and rewrite it.
class FunctionDeclHandler final : public ast_matchers::MatchFinder::MatchCallback, public InsightsBase
{
public:
FunctionDeclHandler(Rewriter& rewrite, ast_matchers::MatchFinder& matcher);
void run(const ast_matchers::MatchFinder::MatchResult& result) override;
};
//-----------------------------------------------------------------------------
} // namespace clang::insights
#endif /* INSIGHTS_FUNCTION_DECL_HANDLER_H */