systemc-clang 2.0.0
Parsing SystemC constructs
Loading...
Searching...
No Matches
sc_ast_matchers::SensitiveOperatorCallMatcher Class Reference

#include <SensitivityMatcher.h>

Inheritance diagram for sc_ast_matchers::SensitiveOperatorCallMatcher:
Collaboration diagram for sc_ast_matchers::SensitiveOperatorCallMatcher:

Public Member Functions

clang::CXXMemberCallExpr * getMemberExprCallExpr ()
 
clang::MemberExpr * getMemberExprWithoutCall ()
 
const clang::ArraySubscriptExpr * getMemberArraySubscriptExpr ()
 
void registerMatchers (MatchFinder &finder)
 
virtual void run (const MatchFinder::MatchResult &result)
 

Private Attributes

clang::CXXMemberCallExpr * cxx_mcall_
 
clang::MemberExpr * me_wo_mcall_
 
const clang::ArraySubscriptExpr * array_fd_
 

Detailed Description

class SensitiveOperatorCallMatcher

Definition at line 102 of file SensitivityMatcher.h.

Member Function Documentation

◆ getMemberArraySubscriptExpr()

const clang::ArraySubscriptExpr * sc_ast_matchers::SensitiveOperatorCallMatcher::getMemberArraySubscriptExpr ( )
inline

Definition at line 112 of file SensitivityMatcher.h.

◆ getMemberExprCallExpr()

clang::CXXMemberCallExpr * sc_ast_matchers::SensitiveOperatorCallMatcher::getMemberExprCallExpr ( )
inline

Definition at line 109 of file SensitivityMatcher.h.

◆ getMemberExprWithoutCall()

clang::MemberExpr * sc_ast_matchers::SensitiveOperatorCallMatcher::getMemberExprWithoutCall ( )
inline

Definition at line 111 of file SensitivityMatcher.h.

◆ registerMatchers()

void sc_ast_matchers::SensitiveOperatorCallMatcher::registerMatchers ( MatchFinder & finder)
inline

This is the main matcher for identifying sensitivity lists.

The matcher starts in the constructor of a SystemC module.

  1. Within the constructor, we need to identify operator<< since that is the overloaded member used to add sensitivity parameters.
  2. We want to find every operator<< call with an argument, and those that have the FieldDecl used to be of a certain type (sc_event, sc_interface, ...). This is done because those are the parameters that are allowed for the operator<<.

2a. For the argument, we identify a call expression (cxxMemberCallExpr), or just a MemberExpr that has a declaration of a FieldDecl. 2b. The parameters that are allowed in operator<< are the following.

  • sc_event
  • sc_interface
  • sc_event_finder
  • sc_port_base

clang-format on

Definition at line 136 of file SensitivityMatcher.h.

◆ run()

virtual void sc_ast_matchers::SensitiveOperatorCallMatcher::run ( const MatchFinder::MatchResult & result)
inlinevirtual

Definition at line 181 of file SensitivityMatcher.h.

Member Data Documentation

◆ array_fd_

const clang::ArraySubscriptExpr* sc_ast_matchers::SensitiveOperatorCallMatcher::array_fd_
private

Definition at line 106 of file SensitivityMatcher.h.

◆ cxx_mcall_

clang::CXXMemberCallExpr* sc_ast_matchers::SensitiveOperatorCallMatcher::cxx_mcall_
private

Definition at line 104 of file SensitivityMatcher.h.

◆ me_wo_mcall_

clang::MemberExpr* sc_ast_matchers::SensitiveOperatorCallMatcher::me_wo_mcall_
private

Definition at line 105 of file SensitivityMatcher.h.


The documentation for this class was generated from the following file: