systemc-clang 2.0.0
Parsing SystemC constructs
Loading...
Searching...
No Matches
sc_ast_matchers::utils Namespace Reference

Namespaces

namespace  array_type
 

Classes

class  NamespaceMatcher
 

Typedefs

typedef std::tuple< clang::FieldDecl *, std::string, const clang::CXXCtorInitializer * > ModuleInitializerTupleType
 

Functions

void collect_sugar (const Type *type, std::vector< clang::Type * > &unwrapped_types)
 
bool isInNamespace (const clang::ValueDecl *fd, const std::vector< llvm::StringRef > &names)
 
bool isInNamespace (const clang::Type *tp, const std::vector< llvm::StringRef > &names)
 
bool matchNames (StringRef str, const std::vector< llvm::StringRef > &names)
 
void dumpExprName (const Expr *expr)
 
bool isInNamespace (const Expr *expr, const std::vector< llvm::StringRef > &names)
 
bool isInNamespace (const CallExpr *cexpr, llvm::StringRef name)
 
template<typename T >
llvm::StringRef getClassNameFromDecl (T *decl)
 
void dumpExprName (const clang::Expr *expr)
 
bool isInNamespace (const clang::Expr *expr, const std::vector< llvm::StringRef > &names)
 
void collect_sugar (const clang::Type *type, std::vector< clang::Type * > &unwrapped_types)
 
bool matchNames (llvm::StringRef str, const std::vector< llvm::StringRef > &names)
 
bool isInNamespace (const clang::CallExpr *cexpr, llvm::StringRef name)
 
bool isCXXMemberCallExprSystemCCall (const clang::CallExpr *ce, const std::vector< llvm::StringRef > &names)
 
bool isCXXMemberCallExprSystemCCall (const clang::Type *type, const std::vector< llvm::StringRef > &names)
 
bool isCXXMemberCallExprSystemCCall (const clang::CXXMemberCallExpr *mce)
 
std::vector< const clang::CXXRecordDecl * > getAllBaseClassNames (const clang::CXXRecordDecl *decl)
 
std::vector< const clang::CXXRecordDecl * > getAllBaseClasses (const clang::CXXRecordDecl *decl)
 
std::vector< ModuleInitializerTupleTypegetModuleInitializerNames (const clang::CXXCtorInitializer *init)
 Get the first constructor argument.
 

Typedef Documentation

◆ ModuleInitializerTupleType

typedef std::tuple<clang::FieldDecl *, std::string, const clang::CXXCtorInitializer *> sc_ast_matchers::utils::ModuleInitializerTupleType

Definition at line 38 of file CXXRecordDeclUtils.h.

Function Documentation

◆ collect_sugar() [1/2]

void sc_ast_matchers::utils::collect_sugar ( const clang::Type * type,
std::vector< clang::Type * > & unwrapped_types )

◆ collect_sugar() [2/2]

void sc_ast_matchers::utils::collect_sugar ( const Type * type,
std::vector< clang::Type * > & unwrapped_types )

Definition at line 13 of file CallExprUtils.cpp.

◆ dumpExprName() [1/2]

void sc_ast_matchers::utils::dumpExprName ( const clang::Expr * expr)

◆ dumpExprName() [2/2]

void sc_ast_matchers::utils::dumpExprName ( const Expr * expr)

Definition at line 175 of file CallExprUtils.cpp.

◆ getAllBaseClasses()

std::vector< const clang::CXXRecordDecl * > sc_ast_matchers::utils::getAllBaseClasses ( const clang::CXXRecordDecl * decl)

Go through all the base classes, and its base classes and collect them together. This will be used to flatten all the member fields

Do not insert into bases the decl class.

Go through all the bases of the base declaration.

Print all the base classes retrieved.

Definition at line 150 of file CXXRecordDeclUtils.cpp.

◆ getAllBaseClassNames()

std::vector< const clang::CXXRecordDecl * > sc_ast_matchers::utils::getAllBaseClassNames ( const clang::CXXRecordDecl * decl)

Go through all the base classes, and its base classes and collect them together. This will be used to flatten all the member fields

Go through all the bases of the base declaration.

Print all the base classes retrieved.

Definition at line 105 of file CXXRecordDeclUtils.cpp.

◆ getClassNameFromDecl()

template<typename T >
llvm::StringRef sc_ast_matchers::utils::getClassNameFromDecl ( T * decl)

Definition at line 34 of file CallExprUtils.h.

◆ getModuleInitializerNames()

std::vector< ModuleInitializerTupleType > sc_ast_matchers::utils::getModuleInitializerNames ( const clang::CXXCtorInitializer * init)

Get the first constructor argument.

Iterate through all the initializers.

Retrieve the first argument

Get the FieldDecl corresponding to the constructor initializer.

Check the type of the FieldDecl.

Definition at line 199 of file CXXRecordDeclUtils.cpp.

◆ isCXXMemberCallExprSystemCCall() [1/3]

bool sc_ast_matchers::utils::isCXXMemberCallExprSystemCCall ( const clang::CallExpr * ce,
const std::vector< llvm::StringRef > & names )

Definition at line 16 of file CXXRecordDeclUtils.cpp.

◆ isCXXMemberCallExprSystemCCall() [2/3]

bool sc_ast_matchers::utils::isCXXMemberCallExprSystemCCall ( const clang::CXXMemberCallExpr * mce)

Definition at line 82 of file CXXRecordDeclUtils.cpp.

◆ isCXXMemberCallExprSystemCCall() [3/3]

bool sc_ast_matchers::utils::isCXXMemberCallExprSystemCCall ( const clang::Type * type,
const std::vector< llvm::StringRef > & names )

Builtin type

Is it a Record type

Definition at line 35 of file CXXRecordDeclUtils.cpp.

◆ isInNamespace() [1/6]

bool sc_ast_matchers::utils::isInNamespace ( const CallExpr * cexpr,
llvm::StringRef name )

Definition at line 275 of file CallExprUtils.cpp.

◆ isInNamespace() [2/6]

bool sc_ast_matchers::utils::isInNamespace ( const clang::CallExpr * cexpr,
llvm::StringRef name )

◆ isInNamespace() [3/6]

bool sc_ast_matchers::utils::isInNamespace ( const clang::Expr * expr,
const std::vector< llvm::StringRef > & names )

◆ isInNamespace() [4/6]

bool sc_ast_matchers::utils::isInNamespace ( const clang::Type * tp,
const std::vector< llvm::StringRef > & names )

Peel off every type and then check that each type (including typedef) is of a certain namespace or not.

Definition at line 66 of file CallExprUtils.cpp.

◆ isInNamespace() [5/6]

bool sc_ast_matchers::utils::isInNamespace ( const clang::ValueDecl * fd,
const std::vector< llvm::StringRef > & names )

Definition at line 25 of file CallExprUtils.cpp.

◆ isInNamespace() [6/6]

bool sc_ast_matchers::utils::isInNamespace ( const Expr * expr,
const std::vector< llvm::StringRef > & names )

Definition at line 193 of file CallExprUtils.cpp.

◆ matchNames() [1/2]

bool sc_ast_matchers::utils::matchNames ( llvm::StringRef str,
const std::vector< llvm::StringRef > & names )

◆ matchNames() [2/2]

bool sc_ast_matchers::utils::matchNames ( StringRef str,
const std::vector< llvm::StringRef > & names )

Definition at line 135 of file CallExprUtils.cpp.