Class InstanceMatcher¶
Defined in File InstanceMatcher.h
Inheritance Relationships¶
Base Type¶
public MatchCallback
Class Documentation¶
-
class
sc_ast_matchers::InstanceMatcher: public MatchCallback¶ Class InstanceMatcher.
Public Types
-
typedef std::tuple<std::string, clang::Decl*, ModuleInstanceType>
InstanceDeclType¶
-
typedef std::vector<InstanceDeclType>
InstanceDeclarationsType¶
-
typedef std::pair<clang::Decl*, ModuleInstanceType>
ModuleInstanceTuple¶ Store all instances in a map. The map key should be the Decl*. This will work for both FieldDecl (instances within sub-modules) and VarDecl separate modules in sc_main().
-
typedef std::map<clang::Decl*, ModuleInstanceType>
InstanceDeclarations¶
Public Functions
-
inline const InstanceDeclarations &
getInstanceMap()¶
-
inline bool
findInstanceByVariableType(clang::CXXRecordDecl *decl, std::vector<InstanceDeclType> &found_instances)¶
-
inline auto
match_ctor_arg(const std::string &bind_arg_name, const std::string &bind_ctor_expr)¶
-
inline auto
makeArraySubModule(llvm::StringRef name)¶
-
inline void
registerMatchers(MatchFinder &finder)¶
-
inline void
parseVarDecl(clang::VarDecl *instance_decl, std::string &instance_name)¶
-
inline void
parseFieldDecl(clang::FieldDecl *instance_decl, clang::ValueDecl *parent_decl, std::string instance_name, IndexMapType &index_map)¶
-
inline virtual void
run(const MatchFinder::MatchResult &result)¶
-
inline void
dump()¶
-
typedef std::tuple<std::string, clang::Decl*, ModuleInstanceType>