Instantiator
Generate c++ template instantiations
Loading...
Searching...
No Matches
InjectInstantiation Class Reference

MatchCallback for injection of explicit instantiations into the source files at appropriate places. More...

#include <Callbacks/InjectInstantiation.hpp>

Inheritance diagram for InjectInstantiation:
[legend]
Collaboration diagram for InjectInstantiation:
[legend]

Public Member Functions

virtual void run (const clang::ast_matchers::MatchFinder::MatchResult &Result) override
 

Public Attributes

std::vector< Injection > * toDoList
 
clang::Rewriter * rewriter
 
bool invasive = false
 

Detailed Description

MatchCallback for injection of explicit instantiations into the source files at appropriate places.

This callback is called for the Matcher FuncWithDef(). The Matcher returns a clang::FunctionDecl or a clang::CXXMethodDecl which has a definition in this translation unit. This callback checks whether there is an Injection item in the toDoList which which fits the current match result. The following is compared for each match result:

  1. Return type
  2. Nested namespace qualifier
  3. Function name
  4. For clang::CXXMethodDecl const qualifier
  5. For clang::CXXMethodDecl parent class name
  6. Function parameters

Definition at line 30 of file InjectInstantiation.hpp.

Member Function Documentation

◆ run()

void InjectInstantiation::run ( const clang::ast_matchers::MatchFinder::MatchResult & Result)
overridevirtual

Definition at line 20 of file InjectInstantiation.cpp.

Member Data Documentation

◆ invasive

bool InjectInstantiation::invasive = false

Definition at line 40 of file InjectInstantiation.hpp.

◆ rewriter

clang::Rewriter* InjectInstantiation::rewriter

Pointer to an external clang::Rewriter object.

Definition at line 38 of file InjectInstantiation.hpp.

◆ toDoList

std::vector<Injection>* InjectInstantiation::toDoList

A pointer to an external vector of Injection which is filled during GetNeededInstantiations.

Definition at line 36 of file InjectInstantiation.hpp.


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