forked from andreasfertig/cppinsights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GlobalVariableHandler.h
31 lines (25 loc) · 1.14 KB
/
GlobalVariableHandler.h
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
/******************************************************************************
*
* C++ Insights, copyright (C) by Andreas Fertig
* Distributed under an MIT license. See LICENSE for details
*
****************************************************************************/
#ifndef INSIGHTS_GLOBAL_VARIABLE_HANDLER_H
#define INSIGHTS_GLOBAL_VARIABLE_HANDLER_H
#include "InsightsBase.h" // for InsightsBase
#include "clang/ASTMatchers/ASTMatchFinder.h" // for MatchFinder, MatchFind...
namespace clang {
class Rewriter;
}
//-----------------------------------------------------------------------------
namespace clang::insights {
/// \brief Replace global variables to show e.g. implicit conversions.
class GlobalVariableHandler final : public ast_matchers::MatchFinder::MatchCallback, public InsightsBase
{
public:
GlobalVariableHandler(Rewriter& rewrite, ast_matchers::MatchFinder& matcher);
void run(const ast_matchers::MatchFinder::MatchResult& result) override;
};
//-----------------------------------------------------------------------------
} // namespace clang::insights
#endif /* INSIGHTS_GLOBAL_VARIABLE_HANDLER_H */