systemc-clang 2.0.0
Parsing SystemC constructs
Loading...
Searching...
No Matches
systemc_clang::FindTemplateTypes Class Reference

#include <FindTemplateTypes.h>

Inheritance diagram for systemc_clang::FindTemplateTypes:
Collaboration diagram for systemc_clang::FindTemplateTypes:

Public Types

typedef TemplateType TemplateTypePtr
 Typedefs.
 
typedef std::vector< TemplateTypePtrtype_vector_t
 
typedef std::vector< TemplateTypePtrargVectorType
 

Public Member Functions

 FindTemplateTypes ()
 
 FindTemplateTypes (const FindTemplateTypes &rhs)
 Copy constructor.
 
 FindTemplateTypes (const FindTemplateTypes *rhs)
 
bool shouldVisitTemplateInstantiations () const
 
bool VisitEnumType (clang::EnumType *e)
 
bool VisitIntegerLiteral (clang::IntegerLiteral *l)
 
bool VisitTemplateSpecializationType (clang::TemplateSpecializationType *special_type)
 
bool VisitTypedefType (clang::TypedefType *typedef_type)
 
bool VisitCXXRecordDecl (clang::CXXRecordDecl *cxx_type)
 
bool VisitRecordType (clang::RecordType *rt)
 
bool VisitBuiltinType (clang::BuiltinType *bi_type)
 
bool VisitDependentNameType (clang::DependentNameType *type)
 
bool VisitDeclRefExpr (clang::DeclRefExpr *dre)
 
virtual ~FindTemplateTypes ()
 
void Enumerate (const clang::Type *type)
 
Tree< TemplateType > * getTemplateArgTreePtr ()
 
void printTemplateArguments (llvm::raw_ostream &os)
 
std::string asString ()
 Returns the TemplateType data as a std::string.
 

Private Attributes

Tree< TemplateTypetemplate_args_
 
Tree< TemplateType >::TreeNodePtr current_type_node_
 
std::stack< Tree< TemplateType >::TreeNodePtr > stack_current_node_
 

Detailed Description

Definition at line 49 of file FindTemplateTypes.h.

Member Typedef Documentation

◆ argVectorType

◆ TemplateTypePtr

◆ type_vector_t

Constructor & Destructor Documentation

◆ FindTemplateTypes() [1/3]

FindTemplateTypes::FindTemplateTypes ( )

Definition at line 39 of file FindTemplateTypes.cpp.

◆ FindTemplateTypes() [2/3]

FindTemplateTypes::FindTemplateTypes ( const FindTemplateTypes & rhs)

Copy constructor.

Definition at line 42 of file FindTemplateTypes.cpp.

◆ FindTemplateTypes() [3/3]

FindTemplateTypes::FindTemplateTypes ( const FindTemplateTypes * rhs)

Definition at line 46 of file FindTemplateTypes.cpp.

◆ ~FindTemplateTypes()

FindTemplateTypes::~FindTemplateTypes ( )
virtual

Definition at line 51 of file FindTemplateTypes.cpp.

Member Function Documentation

◆ asString()

std::string FindTemplateTypes::asString ( )

Returns the TemplateType data as a std::string.

Definition at line 293 of file FindTemplateTypes.cpp.

◆ Enumerate()

void FindTemplateTypes::Enumerate ( const clang::Type * type)

Definition at line 53 of file FindTemplateTypes.cpp.

◆ getTemplateArgTreePtr()

Tree< TemplateType > * FindTemplateTypes::getTemplateArgTreePtr ( )

Definition at line 289 of file FindTemplateTypes.cpp.

◆ printTemplateArguments()

void FindTemplateTypes::printTemplateArguments ( llvm::raw_ostream & os)

Definition at line 323 of file FindTemplateTypes.cpp.

◆ shouldVisitTemplateInstantiations()

bool FindTemplateTypes::shouldVisitTemplateInstantiations ( ) const

Definition at line 34 of file FindTemplateTypes.cpp.

◆ VisitBuiltinType()

bool FindTemplateTypes::VisitBuiltinType ( clang::BuiltinType * bi_type)

Definition at line 137 of file FindTemplateTypes.cpp.

◆ VisitCXXRecordDecl()

bool FindTemplateTypes::VisitCXXRecordDecl ( clang::CXXRecordDecl * cxx_type)

Definition at line 123 of file FindTemplateTypes.cpp.

◆ VisitDeclRefExpr()

bool FindTemplateTypes::VisitDeclRefExpr ( clang::DeclRefExpr * dre)

Definition at line 61 of file FindTemplateTypes.cpp.

◆ VisitDependentNameType()

bool FindTemplateTypes::VisitDependentNameType ( clang::DependentNameType * type)

Definition at line 184 of file FindTemplateTypes.cpp.

◆ VisitEnumType()

bool FindTemplateTypes::VisitEnumType ( clang::EnumType * e)

Definition at line 162 of file FindTemplateTypes.cpp.

◆ VisitIntegerLiteral()

bool FindTemplateTypes::VisitIntegerLiteral ( clang::IntegerLiteral * l)

Definition at line 280 of file FindTemplateTypes.cpp.

◆ VisitRecordType()

bool FindTemplateTypes::VisitRecordType ( clang::RecordType * rt)

Definition at line 203 of file FindTemplateTypes.cpp.

◆ VisitTemplateSpecializationType()

bool FindTemplateTypes::VisitTemplateSpecializationType ( clang::TemplateSpecializationType * special_type)

The specialized template type is used for user-defined template type arguments, and constexpr fpblk_sz (as in ZFP). The issue here is that one is a class, and the other is a function. So, if it's a function that we need to desugar it, and traverse its corresponding type. Otherwise, we proceed. Get the unqualified type.

We don't want it to go further since we called TraverseType().

Definition at line 78 of file FindTemplateTypes.cpp.

◆ VisitTypedefType()

bool FindTemplateTypes::VisitTypedefType ( clang::TypedefType * typedef_type)

Definition at line 193 of file FindTemplateTypes.cpp.

Member Data Documentation

◆ current_type_node_

Tree<TemplateType>::TreeNodePtr systemc_clang::FindTemplateTypes::current_type_node_
private

Definition at line 101 of file FindTemplateTypes.h.

◆ stack_current_node_

std::stack<Tree<TemplateType>::TreeNodePtr> systemc_clang::FindTemplateTypes::stack_current_node_
private

Definition at line 102 of file FindTemplateTypes.h.

◆ template_args_

Tree<TemplateType> systemc_clang::FindTemplateTypes::template_args_
private

Definition at line 100 of file FindTemplateTypes.h.


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