forked from andreasfertig/cppinsights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CompilerGeneratedHandler.h
34 lines (28 loc) · 1.36 KB
/
CompilerGeneratedHandler.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
32
33
34
/******************************************************************************
*
* C++ Insights, copyright (C) by Andreas Fertig
* Distributed under an MIT license. See LICENSE for details
*
****************************************************************************/
#ifndef INSIGHTS_COMPILER_GENERATED_HANDLER_H
#define INSIGHTS_COMPILER_GENERATED_HANDLER_H
#include "InsightsBase.h" // for InsightsBase
#include "clang/ASTMatchers/ASTMatchFinder.h" // for MatchFinder, MatchFind...
namespace clang {
class Rewriter;
}
//-----------------------------------------------------------------------------
namespace clang::insights {
/// \brief Show which special members the compiler generates for a certain class.
///
/// Conveniently the compiler generates special member for us. Like the default constructor, copy or move operators.
/// Under certain circumstances it stops generating. This matches makes it visible.
class CompilerGeneratedHandler final : public ast_matchers::MatchFinder::MatchCallback, public InsightsBase
{
public:
CompilerGeneratedHandler(Rewriter& rewrite, ast_matchers::MatchFinder& Matcher);
void run(const ast_matchers::MatchFinder::MatchResult& result) override;
};
//-----------------------------------------------------------------------------
} // namespace clang::insights
#endif /* INSIGHTS_COMPILER_GENERATED_HANDLER_H */