19#ifndef LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_CFGMATCHSWITCH_H_
20#define LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_CFGMATCHSWITCH_H_
32template <
typename State,
typename Result =
void>
47 template <
typename NodeT>
51 std::move(StmtBuilder).template CaseOf<NodeT>(M, A);
52 return std::move(*
this);
62 template <
typename NodeT>
66 std::move(InitBuilder).template CaseOf<NodeT>(M, A);
67 return std::move(*
this);
71 return [StmtMS = std::move(StmtBuilder).Build(),
72 InitMS = std::move(InitBuilder).Build()](
const CFGElement &Element,
75 switch (Element.getKind()) {
Defines the clang::ASTContext interface.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Represents a top-level expression in a basic block.
Represents C++ base or member initializer from constructor's initialization list.
CXXCtorInitializer * getInitializer() const
const Stmt * getStmt() const
Collects cases of a "match switch": a collection of matchers paired with callbacks,...
Collects cases of a "match switch": a collection of matchers paired with callbacks,...
CFGMatchSwitchBuilder && CaseOfCFGInit(MatchSwitchMatcher< CXXCtorInitializer > M, MatchSwitchAction< NodeT, State, Result > A) &&
Registers an action A for CFGInitializers that will be triggered by the match of the pattern M agains...
CFGMatchSwitchBuilder && CaseOfCFGStmt(MatchSwitchMatcher< Stmt > M, MatchSwitchAction< NodeT, State, Result > A) &&
Registers an action A for CFGStmts that will be triggered by the match of the pattern M against the S...
CFGMatchSwitch< State, Result > Build() &&
std::function< Result(const CFGElement &, ASTContext &, State &)> CFGMatchSwitch
std::function< Result(const T *, const ast_matchers::MatchFinder::MatchResult &, State &)> MatchSwitchAction
ast_matchers::internal::Matcher< T > MatchSwitchMatcher
The JSON file list parser is used to communicate input to InstallAPI.
@ Result
The result type of a method or function.