clang 20.0.0git
|
Represents a C++ unqualified-id that has been parsed. More...
#include "clang/Sema/DeclSpec.h"
Classes | |
struct | OFI |
Public Member Functions | |
UnqualifiedId () | |
void | clear () |
Clear out this unqualified-id, setting it to default (invalid) state. | |
bool | isValid () const |
Determine whether this unqualified-id refers to a valid name. | |
bool | isInvalid () const |
Determine whether this unqualified-id refers to an invalid name. | |
UnqualifiedIdKind | getKind () const |
Determine what kind of name we have. | |
void | setIdentifier (const IdentifierInfo *Id, SourceLocation IdLoc) |
Specify that this unqualified-id was parsed as an identifier. | |
void | setOperatorFunctionId (SourceLocation OperatorLoc, OverloadedOperatorKind Op, SourceLocation SymbolLocations[3]) |
Specify that this unqualified-id was parsed as an operator-function-id. | |
void | setConversionFunctionId (SourceLocation OperatorLoc, ParsedType Ty, SourceLocation EndLoc) |
Specify that this unqualified-id was parsed as a conversion-function-id. | |
void | setLiteralOperatorId (const IdentifierInfo *Id, SourceLocation OpLoc, SourceLocation IdLoc) |
Specific that this unqualified-id was parsed as a literal-operator-id. | |
void | setConstructorName (ParsedType ClassType, SourceLocation ClassNameLoc, SourceLocation EndLoc) |
Specify that this unqualified-id was parsed as a constructor name. | |
void | setConstructorTemplateId (TemplateIdAnnotation *TemplateId) |
Specify that this unqualified-id was parsed as a template-id that names a constructor. | |
void | setDestructorName (SourceLocation TildeLoc, ParsedType ClassType, SourceLocation EndLoc) |
Specify that this unqualified-id was parsed as a destructor name. | |
void | setTemplateId (TemplateIdAnnotation *TemplateId) |
Specify that this unqualified-id was parsed as a template-id. | |
void | setDeductionGuideName (ParsedTemplateTy Template, SourceLocation TemplateLoc) |
Specify that this unqualified-id was parsed as a template-name for a deduction-guide. | |
void | setImplicitSelfParam (const IdentifierInfo *Id) |
Specify that this unqualified-id is an implicit 'self' parameter. | |
SourceRange | getSourceRange () const LLVM_READONLY |
Return the source range that covers this unqualified-id. | |
SourceLocation | getBeginLoc () const LLVM_READONLY |
SourceLocation | getEndLoc () const LLVM_READONLY |
Public Attributes | |
union { | |
const IdentifierInfo * Identifier | |
When Kind == IK_Identifier, the parsed identifier, or when Kind == IK_UserLiteralId, the identifier suffix. More... | |
struct OFI OperatorFunctionId | |
When Kind == IK_OperatorFunctionId, the overloaded operator that we parsed. More... | |
UnionParsedType ConversionFunctionId | |
When Kind == IK_ConversionFunctionId, the type that the conversion function names. More... | |
UnionParsedType ConstructorName | |
When Kind == IK_ConstructorName, the class-name of the type whose constructor is being referenced. More... | |
UnionParsedType DestructorName | |
When Kind == IK_DestructorName, the type referred to by the class-name. More... | |
UnionParsedTemplateTy TemplateName | |
When Kind == IK_DeductionGuideName, the parsed template-name. More... | |
TemplateIdAnnotation * TemplateId | |
When Kind == IK_TemplateId or IK_ConstructorTemplateId, the template-id annotation that contains the template name and template arguments. More... | |
}; | |
Anonymous union that holds extra data associated with the parsed unqualified-id. | |
SourceLocation | StartLocation |
The location of the first token that describes this unqualified-id, which will be the location of the identifier, "operator" keyword, tilde (for a destructor), or the template name of a template-id. | |
SourceLocation | EndLocation |
The location of the last token that describes this unqualified-id. | |
Represents a C++ unqualified-id that has been parsed.
Definition at line 1028 of file DeclSpec.h.
|
inline |
Definition at line 1091 of file DeclSpec.h.
|
inline |
Clear out this unqualified-id, setting it to default (invalid) state.
Definition at line 1096 of file DeclSpec.h.
References EndLocation, Identifier, clang::IK_Identifier, Kind, and StartLocation.
|
inline |
Definition at line 1240 of file DeclSpec.h.
References StartLocation.
|
inline |
Definition at line 1241 of file DeclSpec.h.
References EndLocation.
|
inline |
Determine what kind of name we have.
Definition at line 1110 of file DeclSpec.h.
References Kind.
Referenced by clang::Sema::ActOnPseudoDestructorExpr(), clang::Declarator::isCtorOrDtor(), and clang::Declarator::isStaticMember().
|
inline |
Return the source range that covers this unqualified-id.
Definition at line 1237 of file DeclSpec.h.
References EndLocation, and StartLocation.
|
inline |
Determine whether this unqualified-id refers to an invalid name.
Definition at line 1107 of file DeclSpec.h.
References isValid().
|
inline |
Determine whether this unqualified-id refers to a valid name.
Definition at line 1104 of file DeclSpec.h.
References clang::SourceLocation::isValid(), and StartLocation.
Referenced by isInvalid(), and setOperatorFunctionId().
|
inline |
Specify that this unqualified-id was parsed as a constructor name.
ClassType | the class type referred to by the constructor name. |
ClassNameLoc | the location of the class name. |
EndLoc | the location of the last token that makes up the type name. |
Definition at line 1175 of file DeclSpec.h.
References ConstructorName, EndLocation, clang::IK_ConstructorName, Kind, and StartLocation.
void UnqualifiedId::setConstructorTemplateId | ( | TemplateIdAnnotation * | TemplateId | ) |
Specify that this unqualified-id was parsed as a template-id that names a constructor.
TemplateId | the template-id annotation that describes the parsed template-id. This UnqualifiedId instance will take ownership of the TemplateId and will free it on destruction. |
Definition at line 40 of file DeclSpec.cpp.
References EndLocation, clang::IK_ConstructorTemplateId, clang::TemplateIdAnnotation::isInvalid(), clang::TemplateIdAnnotation::RAngleLoc, StartLocation, TemplateId, and clang::TemplateIdAnnotation::TemplateNameLoc.
|
inline |
Specify that this unqualified-id was parsed as a conversion-function-id.
OperatorLoc | the location of the 'operator' keyword. |
Ty | the type to which this conversion function is converting. |
EndLoc | the location of the last token that makes up the type name. |
Definition at line 1143 of file DeclSpec.h.
References ConversionFunctionId, EndLocation, clang::IK_ConversionFunctionId, Kind, and StartLocation.
|
inline |
Specify that this unqualified-id was parsed as a template-name for a deduction-guide.
Template | The parsed template-name. |
TemplateLoc | The location of the parsed template-name. |
Definition at line 1219 of file DeclSpec.h.
References EndLocation, clang::IK_DeductionGuideName, Kind, and StartLocation.
|
inline |
Specify that this unqualified-id was parsed as a destructor name.
TildeLoc | the location of the '~' that introduces the destructor name. |
ClassType | the name of the class referred to by the destructor name. |
Definition at line 1198 of file DeclSpec.h.
References DestructorName, EndLocation, clang::IK_DestructorName, Kind, and StartLocation.
|
inline |
Specify that this unqualified-id was parsed as an identifier.
Id | the parsed identifier. |
IdLoc | the location of the parsed identifier. |
Definition at line 1116 of file DeclSpec.h.
References EndLocation, Id, Identifier, clang::IK_Identifier, Kind, and StartLocation.
Referenced by clang::SemaCodeCompletion::CodeCompleteObjCSuperMessage().
|
inline |
Specify that this unqualified-id is an implicit 'self' parameter.
Id | the identifier. |
Definition at line 1230 of file DeclSpec.h.
References EndLocation, Id, Identifier, clang::IK_ImplicitSelfParam, Kind, and StartLocation.
Referenced by clang::SemaObjC::BuildIvarRefExpr().
|
inline |
Specific that this unqualified-id was parsed as a literal-operator-id.
Id | the parsed identifier. |
OpLoc | the location of the 'operator' keyword. |
IdLoc | the location of the identifier. |
Definition at line 1160 of file DeclSpec.h.
References EndLocation, Id, Identifier, clang::IK_LiteralOperatorId, Kind, and StartLocation.
void UnqualifiedId::setOperatorFunctionId | ( | SourceLocation | OperatorLoc, |
OverloadedOperatorKind | Op, | ||
SourceLocation | SymbolLocations[3] | ||
) |
Specify that this unqualified-id was parsed as an operator-function-id.
OperatorLoc | the location of the 'operator' keyword. |
Op | the overloaded operator. |
SymbolLocations | the locations of the individual operator symbols in the operator. |
Definition at line 1510 of file DeclSpec.cpp.
References EndLocation, clang::IK_OperatorFunctionId, isValid(), clang::UnqualifiedId::OFI::Operator, OperatorFunctionId, StartLocation, and clang::UnqualifiedId::OFI::SymbolLocations.
Referenced by ParseReductionId().
void UnqualifiedId::setTemplateId | ( | TemplateIdAnnotation * | TemplateId | ) |
Specify that this unqualified-id was parsed as a template-id.
TemplateId | the template-id annotation that describes the parsed template-id. This UnqualifiedId instance will take ownership of the TemplateId and will free it on destruction. |
Definition at line 29 of file DeclSpec.cpp.
References EndLocation, clang::IK_TemplateId, clang::TemplateIdAnnotation::isInvalid(), clang::TemplateIdAnnotation::RAngleLoc, StartLocation, TemplateId, and clang::TemplateIdAnnotation::TemplateNameLoc.
union { ... } clang::UnqualifiedId::@222 |
Anonymous union that holds extra data associated with the parsed unqualified-id.
UnionParsedType clang::UnqualifiedId::ConstructorName |
When Kind == IK_ConstructorName, the class-name of the type whose constructor is being referenced.
Definition at line 1068 of file DeclSpec.h.
Referenced by setConstructorName().
UnionParsedType clang::UnqualifiedId::ConversionFunctionId |
When Kind == IK_ConversionFunctionId, the type that the conversion function names.
Definition at line 1064 of file DeclSpec.h.
Referenced by setConversionFunctionId().
UnionParsedType clang::UnqualifiedId::DestructorName |
When Kind == IK_DestructorName, the type referred to by the class-name.
Definition at line 1072 of file DeclSpec.h.
Referenced by setDestructorName().
SourceLocation clang::UnqualifiedId::EndLocation |
The location of the last token that describes this unqualified-id.
Definition at line 1089 of file DeclSpec.h.
Referenced by clear(), getEndLoc(), getSourceRange(), setConstructorName(), setConstructorTemplateId(), setConversionFunctionId(), clang::Declarator::setDecompositionBindings(), setDeductionGuideName(), setDestructorName(), setIdentifier(), setImplicitSelfParam(), setLiteralOperatorId(), setOperatorFunctionId(), and setTemplateId().
const IdentifierInfo* clang::UnqualifiedId::Identifier |
When Kind == IK_Identifier, the parsed identifier, or when Kind == IK_UserLiteralId, the identifier suffix.
Definition at line 1056 of file DeclSpec.h.
Referenced by clang::Sema::ActOnPseudoDestructorExpr(), clear(), setIdentifier(), setImplicitSelfParam(), and setLiteralOperatorId().
struct OFI clang::UnqualifiedId::OperatorFunctionId |
When Kind == IK_OperatorFunctionId, the overloaded operator that we parsed.
Definition at line 1060 of file DeclSpec.h.
Referenced by setOperatorFunctionId().
SourceLocation clang::UnqualifiedId::StartLocation |
The location of the first token that describes this unqualified-id, which will be the location of the identifier, "operator" keyword, tilde (for a destructor), or the template name of a template-id.
Definition at line 1086 of file DeclSpec.h.
Referenced by clang::Sema::ActOnPseudoDestructorExpr(), clear(), getBeginLoc(), getSourceRange(), isValid(), setConstructorName(), setConstructorTemplateId(), setConversionFunctionId(), setDeductionGuideName(), setDestructorName(), setIdentifier(), setImplicitSelfParam(), setLiteralOperatorId(), setOperatorFunctionId(), and setTemplateId().
TemplateIdAnnotation* clang::UnqualifiedId::TemplateId |
When Kind == IK_TemplateId or IK_ConstructorTemplateId, the template-id annotation that contains the template name and template arguments.
Definition at line 1080 of file DeclSpec.h.
Referenced by clang::Sema::ActOnPseudoDestructorExpr(), setConstructorTemplateId(), and setTemplateId().
UnionParsedTemplateTy clang::UnqualifiedId::TemplateName |
When Kind == IK_DeductionGuideName, the parsed template-name.
Definition at line 1075 of file DeclSpec.h.