<
typename>
classCanQual;
37classDeclarationNameTable;
53:
publicllvm::FoldingSetNode {
69 ID.AddPointer(
Type.getAsOpaquePtr());
76 publicllvm::FoldingSetNode {
90FETokenInfo(nullptr) {}
93 void Profile(llvm::FoldingSetNodeID &
ID) {
ID.AddPointer(Template); }
110 void*FETokenInfo =
nullptr;
117 publicllvm::FoldingSetNode {
130FETokenInfo(nullptr) {}
133 void Profile(llvm::FoldingSetNodeID &FSID) { FSID.AddPointer(
ID); }
174 enumStoredNameKind {
175StoredIdentifier = 0,
176StoredObjCZeroArgSelector = Selector::ZeroArg,
177StoredObjCOneArgSelector = Selector::OneArg,
178StoredCXXConstructorName = 3,
179StoredCXXDestructorName = 4,
180StoredCXXConversionFunctionName = 5,
181StoredCXXOperatorName = 6,
182StoredDeclarationNameExtra = Selector::MultiArg,
184UncommonNameKindOffset = 8
193 "The various classes that DeclarationName::Ptr can point to" 194 " must be at least aligned to 8 bytes!");
197std::is_same<std::underlying_type_t<StoredNameKind>,
198std::underlying_type_t<
200 "The various enums used to compute values for NameKind should " 201 "all have the same underlying type");
210ObjCZeroArgSelector = StoredObjCZeroArgSelector,
211ObjCOneArgSelector = StoredObjCOneArgSelector,
212CXXConstructorName = StoredCXXConstructorName,
213CXXDestructorName = StoredCXXDestructorName,
214CXXConversionFunctionName = StoredCXXConversionFunctionName,
215CXXOperatorName = StoredCXXOperatorName,
216CXXDeductionGuideName = llvm::addEnumValues(
217UncommonNameKindOffset,
218detail::DeclarationNameExtra::CXXDeductionGuideName),
219CXXLiteralOperatorName = llvm::addEnumValues(
220UncommonNameKindOffset,
221detail::DeclarationNameExtra::CXXLiteralOperatorName),
223llvm::addEnumValues(UncommonNameKindOffset,
224detail::DeclarationNameExtra::CXXUsingDirective),
225ObjCMultiArgSelector =
226llvm::addEnumValues(UncommonNameKindOffset,
227detail::DeclarationNameExtra::ObjCMultiArgSelector),
265StoredNameKind getStoredNameKind()
const{
266 return static_cast<StoredNameKind
>(Ptr & PtrMask);
269 void*getPtr()
const{
return reinterpret_cast<void*
>(Ptr & ~PtrMask); }
271 voidsetPtrAndKind(
const void*
P, StoredNameKind
Kind) {
273assert((
Kind& ~PtrMask) == 0 &&
274 "Invalid StoredNameKind in setPtrAndKind!");
275assert((PAsInteger & PtrMask) == 0 &&
276 "Improperly aligned pointer in setPtrAndKind!");
277Ptr = PAsInteger |
Kind;
281DeclarationName(detail::DeclarationNameExtra *Name) {
282setPtrAndKind(Name, StoredDeclarationNameExtra);
286DeclarationName(detail::CXXSpecialNameExtra *Name,
287StoredNameKind StoredKind) {
288assert((StoredKind == StoredCXXConstructorName ||
289StoredKind == StoredCXXDestructorName ||
290StoredKind == StoredCXXConversionFunctionName) &&
291 "Invalid StoredNameKind when constructing a DeclarationName" 292 " from a CXXSpecialNameExtra!");
293setPtrAndKind(Name, StoredKind);
297DeclarationName(detail::CXXOperatorIdName *Name) {
298setPtrAndKind(Name, StoredCXXOperatorName);
302IdentifierInfo *castAsIdentifierInfo()
const{
303assert((getStoredNameKind() == StoredIdentifier) &&
304 "DeclarationName does not store an IdentifierInfo!");
305 return static_cast<IdentifierInfo *
>(getPtr());
310detail::DeclarationNameExtra *castAsExtra()
const{
311assert((getStoredNameKind() == StoredDeclarationNameExtra) &&
312 "DeclarationName does not store an Extra structure!");
313 return static_cast<detail::DeclarationNameExtra *
>(getPtr());
318detail::CXXSpecialNameExtra *castAsCXXSpecialNameExtra()
const{
319assert((getStoredNameKind() == StoredCXXConstructorName ||
320getStoredNameKind() == StoredCXXDestructorName ||
321getStoredNameKind() == StoredCXXConversionFunctionName) &&
322 "DeclarationName does not store a CXXSpecialNameExtra!");
323 return static_cast<detail::CXXSpecialNameExtra *
>(getPtr());
328detail::CXXOperatorIdName *castAsCXXOperatorIdName()
const{
329assert((getStoredNameKind() == StoredCXXOperatorName) &&
330 "DeclarationName does not store a CXXOperatorIdName!");
331 return static_cast<detail::CXXOperatorIdName *
>(getPtr());
336detail::CXXDeductionGuideNameExtra *castAsCXXDeductionGuideNameExtra()
const{
337assert(getNameKind() == CXXDeductionGuideName &&
338 "DeclarationName does not store a CXXDeductionGuideNameExtra!");
339 return static_cast<detail::CXXDeductionGuideNameExtra *
>(getPtr());
344detail::CXXLiteralOperatorIdName *castAsCXXLiteralOperatorIdName()
const{
345assert(getNameKind() == CXXLiteralOperatorName &&
346 "DeclarationName does not store a CXXLiteralOperatorIdName!");
347 return static_cast<detail::CXXLiteralOperatorIdName *
>(getPtr());
352 void*getFETokenInfoSlow()
const;
353 voidsetFETokenInfoSlow(
void*T);
361setPtrAndKind(II, StoredIdentifier);
366: Ptr(reinterpret_cast<
uintptr_t>(Sel.InfoPtr.getOpaqueValue())) {}
372detail::DeclarationNameExtra::CXXUsingDirective);
377 explicit operator bool()
const{
378 returngetPtr() || (getStoredNameKind() != StoredIdentifier);
385 bool isIdentifier()
const{
returngetStoredNameKind() == StoredIdentifier; }
387 returngetStoredNameKind() == StoredObjCZeroArgSelector;
390 returngetStoredNameKind() == StoredObjCOneArgSelector;
397StoredNameKind StoredKind = getStoredNameKind();
398 if(StoredKind != StoredDeclarationNameExtra)
399 return static_cast<NameKind>(StoredKind);
403 unsignedExtraKind = castAsExtra()->getKind();
404 return static_cast<NameKind>(UncommonNameKindOffset + ExtraKind);
413 boolisDependentName()
const;
422 returncastAsIdentifierInfo();
450 if(getStoredNameKind() == StoredCXXConstructorName ||
451getStoredNameKind() == StoredCXXDestructorName ||
452getStoredNameKind() == StoredCXXConversionFunctionName) {
453assert(getPtr() &&
"getCXXNameType on a null DeclarationName!");
454 returncastAsCXXSpecialNameExtra()->Type;
462 if(getNameKind() == CXXDeductionGuideName) {
464 "getCXXDeductionGuideTemplate on a null DeclarationName!");
465 returncastAsCXXDeductionGuideNameExtra()->Template;
473 if(getStoredNameKind() == StoredCXXOperatorName) {
474assert(getPtr() &&
"getCXXOverloadedOperator on a null DeclarationName!");
475 returncastAsCXXOperatorIdName()->Kind;
483 if(getNameKind() == CXXLiteralOperatorName) {
484assert(getPtr() &&
"getCXXLiteralIdentifier on a null DeclarationName!");
485 returncastAsCXXLiteralOperatorIdName()->ID;
492assert((getNameKind() == ObjCZeroArgSelector ||
493getNameKind() == ObjCOneArgSelector ||
494getNameKind() == ObjCMultiArgSelector || !getPtr()) &&
503assert(getPtr() &&
"getFETokenInfo on an empty DeclarationName!");
504 if(getStoredNameKind() == StoredIdentifier)
505 returncastAsIdentifierInfo()->getFETokenInfo();
506 returngetFETokenInfoSlow();
510assert(getPtr() &&
"setFETokenInfo on an empty DeclarationName!");
511 if(getStoredNameKind() == StoredIdentifier)
512castAsIdentifierInfo()->setFETokenInfo(
T);
514setFETokenInfoSlow(
T);
519 returnLHS.Ptr == RHS.Ptr;
524 returnLHS.Ptr != RHS.Ptr;
546raw_ostream &operator<<(raw_ostream &OS, DeclarationName N);
551 returnDeclarationName::compare(LHS, RHS) < 0;
557 returnDeclarationName::compare(LHS, RHS) > 0;
563 returnDeclarationName::compare(LHS, RHS) <= 0;
569 returnDeclarationName::compare(LHS, RHS) >= 0;
584llvm::FoldingSet<detail::CXXSpecialNameExtra> CXXConstructorNames;
589llvm::FoldingSet<detail::CXXSpecialNameExtra> CXXDestructorNames;
595llvm::FoldingSet<detail::CXXSpecialNameExtra> CXXConversionFunctionNames;
606llvm::FoldingSet<detail::CXXLiteralOperatorIdName> CXXLiteralOperatorNames;
612llvm::FoldingSet<detail::CXXDeductionGuideNameExtra> CXXDeductionGuideNames;
678 structCXXLitOpName {
688 structCXXOpName CXXOperatorName;
689 structCXXLitOpName CXXLiteralOperatorName;
692 voidsetNamedTypeLoc(
TypeSourceInfo*TInfo) { NamedType.TInfo = TInfo; }
694 voidsetCXXOperatorNameRange(SourceRange
Range) {
695CXXOperatorName.BeginOpNameLoc =
Range.getBegin().getRawEncoding();
696CXXOperatorName.EndOpNameLoc =
Range.getEnd().getRawEncoding();
699 voidsetCXXLiteralOperatorNameLoc(SourceLocation
Loc) {
700CXXLiteralOperatorName.OpNameLoc =
Loc.getRawEncoding();
704DeclarationNameLoc(DeclarationName Name);
714 returnSourceLocation::getFromRawEncoding(CXXOperatorName.BeginOpNameLoc);
719 returnSourceLocation::getFromRawEncoding(CXXOperatorName.EndOpNameLoc);
727getCXXOperatorNameEndLoc());
734 returnSourceLocation::getFromRawEncoding(CXXLiteralOperatorName.OpNameLoc);
741DNL.setNamedTypeLoc(TInfo);
748 returnmakeCXXOperatorNameLoc(
SourceRange(BeginLoc, EndLoc));
754DNL.setCXXOperatorNameRange(
Range);
761DNL.setCXXLiteralOperatorNameLoc(
Loc);
784: Name(Name), NameLoc(NameLoc), LocInfo(Name) {}
788: Name(Name), NameLoc(NameLoc), LocInfo(LocInfo) {}
808 if(Name.getNameKind() != DeclarationName::CXXConstructorName &&
809Name.getNameKind() != DeclarationName::CXXDestructorName &&
810Name.getNameKind() != DeclarationName::CXXConversionFunctionName)
818assert(Name.getNameKind() == DeclarationName::CXXConstructorName ||
819Name.getNameKind() == DeclarationName::CXXDestructorName ||
820Name.getNameKind() == DeclarationName::CXXConversionFunctionName);
821LocInfo = DeclarationNameLoc::makeNamedTypeLoc(TInfo);
827 if(Name.getNameKind() != DeclarationName::CXXOperatorName)
835assert(Name.getNameKind() == DeclarationName::CXXOperatorName);
836LocInfo = DeclarationNameLoc::makeCXXOperatorNameLoc(R);
843 if(Name.getNameKind() != DeclarationName::CXXLiteralOperatorName)
852assert(Name.getNameKind() == DeclarationName::CXXLiteralOperatorName);
853LocInfo = DeclarationNameLoc::makeCXXLiteralOperatorNameLoc(
Loc);
857 boolisInstantiationDependent()
const;
861 boolcontainsUnexpandedParameterPack()
const;
879 returnEndLoc.
isValid() ? EndLoc : getBeginLoc();
891DiagnosticsEngine::ak_declarationname);
895raw_ostream &operator<<(raw_ostream &OS, DeclarationNameInfo DNInfo);
904structDenseMapInfo<
clang::DeclarationName> {
914 returnDenseMapInfo<void*>::getHashValue(Name.getAsOpaquePtr());
925 return P.getAsOpaquePtr();
930 static constexpr intNumLowBitsAvailable = 0;
Defines the Diagnostic-related interfaces.
enum clang::sema::@1704::IndirectLocalPathEntry::EntryKind Kind
static void dump(llvm::raw_ostream &OS, StringRef FunctionName, ArrayRef< CounterExpression > Expressions, ArrayRef< CounterMappingRegion > Regions)
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
static void print(llvm::raw_ostream &OS, const T &V, ASTContext &ASTCtx, QualType Ty)
Defines an enumeration for C++ overloaded operators.
Implements a partial diagnostic that can be emitted anwyhere in a DiagnosticBuilder stream.
static bool compare(const PathDiagnostic &X, const PathDiagnostic &Y)
Defines the clang::SourceLocation class and associated facilities.
C Language Family Type Representation.
__DEVICE__ void * memset(void *__a, int __b, size_t __c)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
A structure for storing the information associated with a name that has been assumed to be a template...
DeclarationName getDeclName() const
Get the name of the template.
DeclarationNameLoc - Additional source/type location info for a declaration name.
static DeclarationNameLoc makeNamedTypeLoc(TypeSourceInfo *TInfo)
Construct location information for a constructor, destructor or conversion operator.
static DeclarationNameLoc makeCXXLiteralOperatorNameLoc(SourceLocation Loc)
Construct location information for a literal C++ operator.
SourceLocation getCXXLiteralOperatorNameLoc() const
Return the location of the literal operator name (without the operator keyword).
SourceLocation getCXXOperatorNameBeginLoc() const
Return the beginning location of the getCXXOperatorNameRange() range.
TypeSourceInfo * getNamedTypeInfo() const
Returns the source type info.
static DeclarationNameLoc makeCXXOperatorNameLoc(SourceLocation BeginLoc, SourceLocation EndLoc)
Construct location information for a non-literal C++ operator.
SourceLocation getCXXOperatorNameEndLoc() const
Return the end location of the getCXXOperatorNameRange() range.
SourceRange getCXXOperatorNameRange() const
Return the range of the operator name (without the operator keyword).
static DeclarationNameLoc makeCXXOperatorNameLoc(SourceRange Range)
Construct location information for a non-literal C++ operator.
The name of a declaration.
static DeclarationName getFromOpaqueInteger(uintptr_t P)
Get a declaration name from an opaque integer returned by getAsOpaqueInteger.
uintptr_t getAsOpaqueInteger() const
Get the representation of this declaration name as an opaque integer.
IdentifierInfo * getAsIdentifierInfo() const
Retrieve the IdentifierInfo * stored in this declaration name, or null if this declaration name isn't...
static DeclarationName getEmptyMarker()
static DeclarationName getFromOpaquePtr(void *P)
Get a declaration name from an opaque pointer returned by getAsOpaquePtr.
static DeclarationName getTombstoneMarker()
TemplateDecl * getCXXDeductionGuideTemplate() const
If this name is the name of a C++ deduction guide, return the template associated with that name.
DeclarationName(Selector Sel)
Construct a declaration name from an Objective-C selector.
void * getAsOpaquePtr() const
Get the representation of this declaration name as an opaque pointer.
const IdentifierInfo * getCXXLiteralIdentifier() const
If this name is the name of a literal operator, retrieve the identifier associated with it.
friend bool operator==(DeclarationName LHS, DeclarationName RHS)
Determine whether the specified names are identical.
static DeclarationName getUsingDirectiveName()
Returns the name for all C++ using-directives.
friend bool operator!=(DeclarationName LHS, DeclarationName RHS)
Determine whether the specified names are different.
OverloadedOperatorKind getCXXOverloadedOperator() const
If this name is the name of an overloadable operator in C++ (e.g., operator+), retrieve the kind of o...
bool isObjCZeroArgSelector() const
NameKind
The kind of the name stored in this DeclarationName.
void * getFETokenInfo() const
Get and set FETokenInfo.
QualType getCXXNameType() const
If this name is one of the C++ names (of a constructor, destructor, or conversion function),...
Selector getObjCSelector() const
Get the Objective-C selector stored in this declaration name.
bool isObjCOneArgSelector() const
DeclarationName()
Construct an empty declaration name.
NameKind getNameKind() const
Determine what kind of name this is.
bool isEmpty() const
Evaluates true when this declaration name is empty.
DeclarationName(const IdentifierInfo *II)
Construct a declaration name from an IdentifierInfo *.
void setFETokenInfo(void *T)
bool isIdentifier() const
Predicate functions for querying what type of name this is.
One of these records is kept for each identifier that is lexed.
This represents a decl that may have a name.
A (possibly-)qualified type.
Smart pointer class that efficiently represents Objective-C method names.
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
A trivial tuple used to represent a source range.
The streaming interface shared between DiagnosticBuilder and PartialDiagnostic.
void AddTaggedVal(uint64_t V, DiagnosticsEngine::ArgumentKind Kind) const
The base class of all kinds of template declarations (e.g., class, function, etc.).
A container of type source information.
The base class of the type hierarchy.
Implementation class used to describe either a set of overloaded template names or an already-substit...
Contains the actual identifier that makes up the name of a C++ literal operator.
void Profile(llvm::FoldingSetNodeID &FSID)
Contains extra information for the name of an overloaded operator in C++, such as "operator+.
The JSON file list parser is used to communicate input to InstallAPI.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
@ OO_None
Not an overloaded operator.
@ NUM_OVERLOADED_OPERATORS
bool operator<(DeclarationName LHS, DeclarationName RHS)
Ordering on two declaration names.
CanQual< Type > CanQualType
Represents a canonical, potentially-qualified type.
bool operator<=(DeclarationName LHS, DeclarationName RHS)
Ordering on two declaration names.
bool operator>(DeclarationName LHS, DeclarationName RHS)
Ordering on two declaration names.
const FunctionProtoType * T
bool operator>=(DeclarationName LHS, DeclarationName RHS)
Ordering on two declaration names.
llvm::StringRef getAsString(SyncScope S)
Diagnostic wrappers for TextAPI types for error reporting.
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
SourceLocation getLoc() const
getLoc - Returns the main location of the declaration name.
DeclarationName getName() const
getName - Returns the embedded declaration name.
void setLoc(SourceLocation L)
setLoc - Sets the main location of the declaration name.
void setCXXLiteralOperatorNameLoc(SourceLocation Loc)
setCXXLiteralOperatorNameLoc - Sets the location of the literal operator name (not the operator keywo...
void setNamedTypeInfo(TypeSourceInfo *TInfo)
setNamedTypeInfo - Sets the source type info associated to the name.
void setInfo(const DeclarationNameLoc &Info)
void setCXXOperatorNameRange(SourceRange R)
setCXXOperatorNameRange - Sets the range of the operator name (without the operator keyword).
SourceRange getCXXOperatorNameRange() const
getCXXOperatorNameRange - Gets the range of the operator name (without the operator keyword).
DeclarationNameInfo(DeclarationName Name, SourceLocation NameLoc)
void setName(DeclarationName N)
setName - Sets the embedded declaration name.
const DeclarationNameLoc & getInfo() const
SourceLocation getBeginLoc() const
getBeginLoc - Retrieve the location of the first token.
TypeSourceInfo * getNamedTypeInfo() const
getNamedTypeInfo - Returns the source type info associated to the name.
SourceRange getSourceRange() const LLVM_READONLY
getSourceRange - The range of the declaration name.
DeclarationNameInfo(DeclarationName Name, SourceLocation NameLoc, DeclarationNameLoc LocInfo)
SourceLocation getCXXLiteralOperatorNameLoc() const
getCXXLiteralOperatorNameLoc - Returns the location of the literal operator name (not the operator ke...
SourceLocation getEndLoc() const LLVM_READONLY
DeclarationNameInfo()=default
Describes how types, statements, expressions, and declarations should be printed.
static clang::DeclarationName getEmptyKey()
static clang::DeclarationName getTombstoneKey()
static bool isEqual(clang::DeclarationName LHS, clang::DeclarationName RHS)
static unsigned getHashValue(clang::DeclarationName Name)
static void * getAsVoidPointer(clang::DeclarationName P)
static clang::DeclarationName getFromVoidPointer(void *P)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4