15 #ifndef LLVM_CLANG_TEMPLATE_INST_CALLBACK_H 16 #define LLVM_CLANG_TEMPLATE_INST_CALLBACK_H 43 template <
class TemplateInstantiationCallbackPtrs>
44 void initialize(TemplateInstantiationCallbackPtrs &Callbacks,
45 const Sema &TheSema) {
46 for (
auto &
C : Callbacks) {
48 C->initialize(TheSema);
52 template <
class TemplateInstantiationCallbackPtrs>
53 void finalize(TemplateInstantiationCallbackPtrs &Callbacks,
54 const Sema &TheSema) {
55 for (
auto &
C : Callbacks) {
61 template <
class TemplateInstantiationCallbackPtrs>
65 for (
auto &
C : Callbacks) {
67 C->atTemplateBegin(TheSema, Inst);
71 template <
class TemplateInstantiationCallbackPtrs>
75 for (
auto &
C : Callbacks) {
77 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.