|
clang
5.0.0
|
A context in which code is being synthesized (where a source location alone is not sufficient to identify the context). More...
#include "clang/Sema/Sema.h"
Public Types | |
| enum | SynthesisKind { TemplateInstantiation, DefaultTemplateArgumentInstantiation, DefaultFunctionArgumentInstantiation, ExplicitTemplateArgumentSubstitution, DeducedTemplateArgumentSubstitution, PriorTemplateArgumentSubstitution, DefaultTemplateArgumentChecking, ExceptionSpecInstantiation, DeclaringSpecialMember, DefiningSynthesizedFunction } |
| The kind of template instantiation we are performing. More... | |
Public Member Functions | |
| ArrayRef< TemplateArgument > | template_arguments () const |
| CodeSynthesisContext () | |
| bool | isInstantiationRecord () const |
| Determines whether this template is an actual instantiation that should be counted toward the maximum instantiation depth. More... | |
Public Attributes | |
| enum clang::Sema::CodeSynthesisContext::SynthesisKind | Kind |
| bool | SavedInNonInstantiationSFINAEContext |
| Was the enclosing context a non-instantiation SFINAE context? More... | |
| SourceLocation | PointOfInstantiation |
| The point of instantiation or synthesis within the source code. More... | |
| Decl * | Entity |
| The entity that is being synthesized. More... | |
| NamedDecl * | Template |
| The template (or partial specialization) in which we are performing the instantiation, for substitutions of prior template arguments. More... | |
| const TemplateArgument * | TemplateArgs |
| The list of template arguments we are substituting, if they are not part of the entity. More... | |
| union { | |
| unsigned NumTemplateArgs | |
| The number of template arguments in TemplateArgs. More... | |
| CXXSpecialMember SpecialMember | |
| The special member being declared or defined. More... | |
| }; | |
| sema::TemplateDeductionInfo * | DeductionInfo |
| The template deduction info object associated with the substitution or checking of explicit or deduced template arguments. More... | |
| SourceRange | InstantiationRange |
| The source range that covers the construct that cause the instantiation, e.g., the template-id that causes a class template instantiation. More... | |
A context in which code is being synthesized (where a source location alone is not sufficient to identify the context).
This covers template instantiation and various forms of implicitly-generated functions.
The kind of template instantiation we are performing.
| Enumerator | |
|---|---|
| TemplateInstantiation |
We are instantiating a template declaration. The entity is the declaration we're instantiating (e.g., a CXXRecordDecl). |
| DefaultTemplateArgumentInstantiation |
We are instantiating a default argument for a template parameter. The Entity is the template parameter whose argument is being instantiated, the Template is the template, and the TemplateArgs/NumTemplateArguments provide the template arguments as specified. |
| DefaultFunctionArgumentInstantiation |
We are instantiating a default argument for a function. The Entity is the ParmVarDecl, and TemplateArgs/NumTemplateArgs provides the template arguments as specified. |
| ExplicitTemplateArgumentSubstitution |
We are substituting explicit template arguments provided for a function template. The entity is a FunctionTemplateDecl. |
| DeducedTemplateArgumentSubstitution |
We are substituting template argument determined as part of template argument deduction for either a class template partial specialization or a function template. The Entity is either a {Class|Var}TemplatePartialSpecializationDecl or a TemplateDecl. |
| PriorTemplateArgumentSubstitution |
We are substituting prior template arguments into a new template parameter. The template parameter itself is either a NonTypeTemplateParmDecl or a TemplateTemplateParmDecl. |
| DefaultTemplateArgumentChecking |
We are checking the validity of a default template argument that has been used when naming a template-id. |
| ExceptionSpecInstantiation |
We are instantiating the exception specification for a function template which was deferred until it was needed. |
| DeclaringSpecialMember |
We are declaring an implicit special member function. |
| DefiningSynthesizedFunction |
We are defining a synthesized function (such as a defaulted special member). |
|
inline |
| bool Sema::CodeSynthesisContext::isInstantiationRecord | ( | ) | const |
Determines whether this template is an actual instantiation that should be counted toward the maximum instantiation depth.
Definition at line 187 of file SemaTemplateInstantiate.cpp.
Referenced by clang::Sema::pushCodeSynthesisContext().
|
inline |
| union { ... } |
| sema::TemplateDeductionInfo* clang::Sema::CodeSynthesisContext::DeductionInfo |
| Decl* clang::Sema::CodeSynthesisContext::Entity |
The entity that is being synthesized.
Definition at line 7054 of file Sema.h.
Referenced by clang::Sema::SynthesizedFunctionScope::addContextNote().
| SourceRange clang::Sema::CodeSynthesisContext::InstantiationRange |
| enum clang::Sema::CodeSynthesisContext::SynthesisKind clang::Sema::CodeSynthesisContext::Kind |
Referenced by clang::Sema::SynthesizedFunctionScope::addContextNote().
| unsigned clang::Sema::CodeSynthesisContext::NumTemplateArgs |
| SourceLocation clang::Sema::CodeSynthesisContext::PointOfInstantiation |
The point of instantiation or synthesis within the source code.
Definition at line 7051 of file Sema.h.
Referenced by clang::Sema::SynthesizedFunctionScope::addContextNote().
| bool clang::Sema::CodeSynthesisContext::SavedInNonInstantiationSFINAEContext |
Was the enclosing context a non-instantiation SFINAE context?
Definition at line 7048 of file Sema.h.
Referenced by clang::Sema::pushCodeSynthesisContext().
| CXXSpecialMember clang::Sema::CodeSynthesisContext::SpecialMember |
| NamedDecl* clang::Sema::CodeSynthesisContext::Template |
| const TemplateArgument* clang::Sema::CodeSynthesisContext::TemplateArgs |
1.8.6