14 #ifndef LLVM_CLANG_TEMPLATE_INST_CALLBACK_H 15 #define LLVM_CLANG_TEMPLATE_INST_CALLBACK_H 42 template <
class TemplateInstantiationCallbackPtrs>
43 void initialize(TemplateInstantiationCallbackPtrs &Callbacks,
44 const Sema &TheSema) {
45 for (
auto &
C : Callbacks) {
47 C->initialize(TheSema);
51 template <
class TemplateInstantiationCallbackPtrs>
52 void finalize(TemplateInstantiationCallbackPtrs &Callbacks,
53 const Sema &TheSema) {
54 for (
auto &
C : Callbacks) {
60 template <
class TemplateInstantiationCallbackPtrs>
64 for (
auto &
C : Callbacks) {
66 C->atTemplateBegin(TheSema, Inst);
70 template <
class TemplateInstantiationCallbackPtrs>
74 for (
auto &
C : Callbacks) {
76 C->atTemplateEnd(TheSema, Inst);
A context in which code is being synthesized (where a source location alone is not sufficient to iden...
This is a base class for callbacks that will be notified at every template instantiation.
virtual void initialize(const Sema &TheSema)=0
Called before doing AST-parsing.
Sema - This implements semantic analysis and AST building for C.
virtual void finalize(const Sema &TheSema)=0
Called after AST-parsing is completed.
Dataflow Directional Tag Classes.
virtual ~TemplateInstantiationCallback()=default
virtual void atTemplateBegin(const Sema &TheSema, const Sema::CodeSynthesisContext &Inst)=0
Called when instantiation of a template just began.
virtual void atTemplateEnd(const Sema &TheSema, const Sema::CodeSynthesisContext &Inst)=0
Called when instantiation of a template is just about to end.