LLVM_PREFERRED_TYPE(
bool)
90LLVM_PREFERRED_TYPE(
bool)
97: GetterId(getterId), SetterId(setterId) {}
113using ArgsUnion= llvm::PointerUnion<Expr *, IdentifierLoc *>;
127 privatellvm::TrailingObjects<
128ParsedAttr, ArgsUnion, detail::AvailabilityData,
129detail::TypeTagForDatatypeData, ParsedType, detail::PropertyData> {
130 friendTrailingObjects;
132 size_tnumTrailingObjects(OverloadToken<ArgsUnion>)
const{
returnNumArgs; }
133 size_tnumTrailingObjects(OverloadToken<detail::AvailabilityData>)
const{
134 returnIsAvailability;
137numTrailingObjects(OverloadToken<detail::TypeTagForDatatypeData>)
const{
138 returnIsTypeTagForDatatype;
140 size_tnumTrailingObjects(OverloadToken<ParsedType>)
const{
141 returnHasParsedType;
143 size_tnumTrailingObjects(OverloadToken<detail::PropertyData>)
const{
154 unsignedNumArgs : 16;
157LLVM_PREFERRED_TYPE(
bool)
158 mutable unsignedInvalid : 1;
161LLVM_PREFERRED_TYPE(
bool)
162 mutable unsignedUsedAsTypeAttr : 1;
166LLVM_PREFERRED_TYPE(
bool)
167 unsignedIsAvailability : 1;
171LLVM_PREFERRED_TYPE(
bool)
172 unsignedIsTypeTagForDatatype : 1;
176LLVM_PREFERRED_TYPE(
bool)
177 unsignedIsProperty : 1;
180LLVM_PREFERRED_TYPE(
bool)
181 unsignedHasParsedType : 1;
184LLVM_PREFERRED_TYPE(
bool)
185 mutable unsignedHasProcessingCache : 1;
188 mutable unsignedProcessingCache : 8;
191LLVM_PREFERRED_TYPE(
bool)
192 mutable unsignedIsPragmaClangAttribute : 1;
198 const Expr*MessageExpr;
202 ArgsUnion*getArgsBuffer() {
returngetTrailingObjects<ArgsUnion>(); }
204 returngetTrailingObjects<ArgsUnion>();
208 returngetTrailingObjects<detail::AvailabilityData>();
211 returngetTrailingObjects<detail::AvailabilityData>();
224EllipsisLoc(ellipsisLoc), NumArgs(numArgs), Invalid(
false),
225UsedAsTypeAttr(
false), IsAvailability(
false),
226IsTypeTagForDatatype(
false), IsProperty(
false), HasParsedType(
false),
227HasProcessingCache(
false), IsPragmaClangAttribute(
false),
242NumArgs(1), Invalid(
false), UsedAsTypeAttr(
false), IsAvailability(
true),
243IsTypeTagForDatatype(
false), IsProperty(
false), HasParsedType(
false),
244HasProcessingCache(
false), IsPragmaClangAttribute(
false),
245UnavailableLoc(unavailable), MessageExpr(messageExpr),
249 new(getAvailabilityData())
251replacementExpr, environmentLoc);
255ParsedAttr(IdentifierInfo *attrName, SourceRange attrRange,
256IdentifierInfo *scopeName, SourceLocation scopeLoc,
257IdentifierLoc *Parm1, IdentifierLoc *Parm2, IdentifierLoc *Parm3,
259: AttributeCommonInfo(attrName, scopeName, attrRange, scopeLoc, formUsed),
260NumArgs(3), Invalid(
false), UsedAsTypeAttr(
false),
261IsAvailability(
false), IsTypeTagForDatatype(
false), IsProperty(
false),
262HasParsedType(
false), HasProcessingCache(
false),
263IsPragmaClangAttribute(
false), Info(ParsedAttrInfo::get(*this)) {
264ArgsUnion *Args = getArgsBuffer();
271ParsedAttr(IdentifierInfo *attrName, SourceRange attrRange,
272IdentifierInfo *scopeName, SourceLocation scopeLoc,
273IdentifierLoc *ArgKind, ParsedType matchingCType,
274 boollayoutCompatible,
boolmustBeNull, Form formUsed)
275: AttributeCommonInfo(attrName, scopeName, attrRange, scopeLoc, formUsed),
277IsAvailability(
false), IsTypeTagForDatatype(
true), IsProperty(
false),
278HasParsedType(
false), HasProcessingCache(
false),
279IsPragmaClangAttribute(
false), Info(ParsedAttrInfo::get(*this)) {
281 memcpy(getArgsBuffer(), &PVal,
sizeof(ArgsUnion));
282detail::TypeTagForDatatypeData &ExtraData = getTypeTagForDatatypeDataSlot();
283 new(&ExtraData.MatchingCType)
ParsedType(matchingCType);
284ExtraData.LayoutCompatible = layoutCompatible;
285ExtraData.MustBeNull = mustBeNull;
289ParsedAttr(IdentifierInfo *attrName, SourceRange attrRange,
290IdentifierInfo *scopeName, SourceLocation scopeLoc,
291ParsedType typeArg, Form formUsed, SourceLocation ellipsisLoc)
292: AttributeCommonInfo(attrName, scopeName, attrRange, scopeLoc, formUsed),
293EllipsisLoc(ellipsisLoc), NumArgs(0),
Invalid(
false),
294UsedAsTypeAttr(
false), IsAvailability(
false),
295IsTypeTagForDatatype(
false), IsProperty(
false), HasParsedType(
true),
296HasProcessingCache(
false), IsPragmaClangAttribute(
false),
297Info(ParsedAttrInfo::get(*this)) {
302ParsedAttr(IdentifierInfo *attrName, SourceRange attrRange,
303IdentifierInfo *scopeName, SourceLocation scopeLoc,
304IdentifierInfo *getterId, IdentifierInfo *setterId, Form formUsed)
305: AttributeCommonInfo(attrName, scopeName, attrRange, scopeLoc, formUsed),
307IsAvailability(
false), IsTypeTagForDatatype(
false), IsProperty(
true),
308HasParsedType(
false), HasProcessingCache(
false),
309IsPragmaClangAttribute(
false), Info(ParsedAttrInfo::get(*this)) {
310 new(&getPropertyDataBuffer()) detail::PropertyData(getterId, setterId);
316detail::TypeTagForDatatypeData &getTypeTagForDatatypeDataSlot() {
317 return*getTrailingObjects<detail::TypeTagForDatatypeData>();
319 constdetail::TypeTagForDatatypeData &getTypeTagForDatatypeDataSlot()
const{
320 return*getTrailingObjects<detail::TypeTagForDatatypeData>();
325 ParsedType&getTypeBuffer() {
return*getTrailingObjects<ParsedType>(); }
327 return*getTrailingObjects<ParsedType>();
332detail::PropertyData &getPropertyDataBuffer() {
334 return*getTrailingObjects<detail::PropertyData>();
336 constdetail::PropertyData &getPropertyDataBuffer()
const{
338 return*getTrailingObjects<detail::PropertyData>();
341 size_tallocated_size()
const;
350 void operator delete(
void*) =
delete;
365assert(hasProcessingCache());
366 returnProcessingCache;
370ProcessingCache = value;
371HasProcessingCache =
true;
390assert(Arg < NumArgs &&
"Arg access out of range!");
391 returngetArgsBuffer()[Arg];
395 returnArg < NumArgs && isa<Expr *>(getArg(Arg));
401 returnArg < NumArgs && isa<IdentifierLoc *>(getArg(Arg));
405 returncast<IdentifierLoc *>(getArg(Arg));
409assert(getParsedKind() == AT_Availability &&
410 "Not an availability attribute");
411 returngetAvailabilityData()->Changes[detail::IntroducedSlot];
415assert(getParsedKind() == AT_Availability &&
416 "Not an availability attribute");
417 returngetAvailabilityData()->Changes[detail::DeprecatedSlot];
421assert(getParsedKind() == AT_Availability &&
422 "Not an availability attribute");
423 returngetAvailabilityData()->Changes[detail::ObsoletedSlot];
427assert(getParsedKind() == AT_Availability &&
428 "Not an availability attribute");
429 returngetAvailabilityData()->StrictLoc;
433assert(getParsedKind() == AT_Availability &&
434 "Not an availability attribute");
435 returnUnavailableLoc;
439assert(getParsedKind() == AT_Availability &&
440 "Not an availability attribute");
445assert(getParsedKind() == AT_Availability &&
446 "Not an availability attribute");
447 returngetAvailabilityData()->Replacement;
451assert(getParsedKind() == AT_Availability &&
452 "Not an availability attribute");
453 returngetAvailabilityData()->EnvironmentLoc;
457assert(getParsedKind() == AT_TypeTagForDatatype &&
458 "Not a type_tag_for_datatype attribute");
459 returngetTypeTagForDatatypeDataSlot().MatchingCType;
463assert(getParsedKind() == AT_TypeTagForDatatype &&
464 "Not a type_tag_for_datatype attribute");
465 returngetTypeTagForDatatypeDataSlot().LayoutCompatible;
469assert(getParsedKind() == AT_TypeTagForDatatype &&
470 "Not a type_tag_for_datatype attribute");
471 returngetTypeTagForDatatypeDataSlot().MustBeNull;
475assert(HasParsedType &&
"Not a type attribute");
476 returngetTypeBuffer();
480assert(isDeclspecPropertyAttribute() &&
481 "Not a __delcspec(property) attribute");
482 returngetPropertyDataBuffer().GetterId;
486assert(isDeclspecPropertyAttribute() &&
487 "Not a __delcspec(property) attribute");
488 returngetPropertyDataBuffer().SetterId;
496MacroExpansionLoc =
Loc;
507assert(hasMacroIdentifier() &&
"Can only get the macro expansion location " 508 "if this attribute has a macro identifier.");
509 returnMacroExpansionLoc;
514 boolcheckExactlyNumArgs(
class Sema&S,
unsignedNum)
const;
517 boolcheckAtLeastNumArgs(
class Sema&S,
unsignedNum)
const;
520 boolcheckAtMostNumArgs(
class Sema&S,
unsignedNum)
const;
522 boolisTargetSpecificAttr()
const;
523 boolisTypeAttr()
const;
524 boolisStmtAttr()
const;
526 boolhasCustomParsing()
const;
527 boolacceptsExprPack()
const;
528 boolisParamExpr(
size_tN)
const;
529 unsignedgetMinArgs()
const;
530 unsignedgetMaxArgs()
const;
531 unsignedgetNumArgMembers()
const;
532 boolhasVariadicArg()
const;
533 voidhandleAttrWithDelayedArgs(
Sema&S,
Decl*
D)
const;
534 booldiagnoseAppertainsTo(
class Sema&S,
const Decl*
D)
const;
535 booldiagnoseAppertainsTo(
class Sema&S,
const Stmt*St)
const;
536 booldiagnoseMutualExclusion(
class Sema&S,
const Decl*
D)
const;
547 booldiagnoseLangOpts(
class Sema&S)
const;
549 boolisKnownToGCC()
const;
550 boolisSupportedByPragmaAttribute()
const;
562 boolslidesFromDeclToDeclSpecLegacyBehavior()
const;
569 unsignedgetSemanticSpelling()
const;
574 switch(getParsedKind()) {
575 caseParsedAttr::AT_OpenCLConstantAddressSpace:
576 returnLangAS::opencl_constant;
577 caseParsedAttr::AT_OpenCLGlobalAddressSpace:
578 returnLangAS::opencl_global;
579 caseParsedAttr::AT_OpenCLGlobalDeviceAddressSpace:
580 returnLangAS::opencl_global_device;
581 caseParsedAttr::AT_OpenCLGlobalHostAddressSpace:
582 returnLangAS::opencl_global_host;
583 caseParsedAttr::AT_OpenCLLocalAddressSpace:
584 returnLangAS::opencl_local;
585 caseParsedAttr::AT_OpenCLPrivateAddressSpace:
586 returnLangAS::opencl_private;
587 caseParsedAttr::AT_OpenCLGenericAddressSpace:
588 returnLangAS::opencl_generic;
590 returnLangAS::Default;
598 caseParsedAttr::AT_OpenCLGlobalAddressSpace:
599 returnLangAS::sycl_global;
600 caseParsedAttr::AT_OpenCLGlobalDeviceAddressSpace:
601 returnLangAS::sycl_global_device;
602 caseParsedAttr::AT_OpenCLGlobalHostAddressSpace:
603 returnLangAS::sycl_global_host;
604 caseParsedAttr::AT_OpenCLLocalAddressSpace:
605 returnLangAS::sycl_local;
606 caseParsedAttr::AT_OpenCLPrivateAddressSpace:
607 returnLangAS::sycl_private;
608 caseParsedAttr::AT_OpenCLGenericAddressSpace:
610 returnLangAS::Default;
617 switch(getParsedKind()) {
618 caseParsedAttr::AT_HLSLGroupSharedAddressSpace:
619 returnLangAS::hlsl_groupshared;
621 returnLangAS::Default;
640AvailabilityAllocSize =
644TypeTagForDatatypeAllocSize =
661InlineFreeListsCapacity =
6621 + (AvailabilityAllocSize -
sizeof(
ParsedAttr)) /
sizeof(
void*)
665llvm::BumpPtrAllocator Alloc;
669SmallVector<SmallVector<ParsedAttr *, 8>, InlineFreeListsCapacity> FreeLists;
675 void*allocate(
size_tsize);
698 void*allocate(
size_tsize) {
699 returnFactory.allocate(size);
703Attrs.push_back(attr);
707 voidremove(ParsedAttr *attr) {
708assert(llvm::is_contained(Attrs, attr) &&
709 "Can't take attribute from a pool that doesn't own it!");
710Attrs.erase(llvm::find(Attrs, attr));
713 voidtakePool(AttributePool &pool);
736Factory.reclaimPool(*
this);
754 void*memory = allocate(
759 returnadd(
new(memory)
ParsedAttr(attrName, attrRange, scopeName, scopeLoc,
760args, numArgs, form, ellipsisLoc));
770 const Expr*ReplacementExpr,
772 void*memory = allocate(AttributeFactory::AvailabilityAllocSize);
773 returnadd(
new(memory)
ParsedAttr(attrName, attrRange, scopeName, scopeLoc,
774Param, introduced, deprecated, obsoleted,
775unavailable, MessageExpr, form, strict,
776ReplacementExpr, EnvironmentLoc));
783 void*memory = allocate(
787 returnadd(
new(memory)
ParsedAttr(attrName, attrRange, scopeName, scopeLoc,
788Param1, Param2, Param3, form));
795 ParsedTypematchingCType,
boollayoutCompatible,
797 void*memory = allocate(AttributeFactory::TypeTagForDatatypeAllocSize);
798 returnadd(
new(memory)
ParsedAttr(attrName, attrRange, scopeName, scopeLoc,
799argumentKind, matchingCType,
800layoutCompatible, mustBeNull, form));
809 void*memory = allocate(
813 returnadd(
new(memory)
ParsedAttr(attrName, attrRange, scopeName, scopeLoc,
814typeArg, formUsed, ellipsisLoc));
822 void*memory = allocate(AttributeFactory::PropertyAllocSize);
823 returnadd(
new(memory)
ParsedAttr(attrName, attrRange, scopeName, scopeLoc,
824getterId, setterId, formUsed));
831 usingSizeType =
decltype(std::declval<VecTy>().size());
841 bool empty()
const{
returnAttrList.empty(); }
842SizeType
size()
const{
returnAttrList.size(); }
848AttrList.push_back(newAttr);
852assert(is_contained(AttrList, ToBeRemoved) &&
853 "Cannot remove attribute that isn't in the list");
854AttrList.erase(llvm::find(AttrList, ToBeRemoved));
859 struct iterator: llvm::iterator_adaptor_base<iterator, VecTy::iterator,
860std::random_access_iterator_tag,
863 iterator(VecTy::iterator I) : iterator_adaptor_base(I) {}
868: llvm::iterator_adaptor_base<const_iterator, VecTy::const_iterator,
869std::random_access_iterator_tag,
879AttrList.insert(AttrList.begin(), B.I,
E.I);
883AttrList.insert(AttrList.begin(), B.I,
E.I);
887AttrList.insert(AttrList.end(), B.I,
E.I);
891AttrList.insert(AttrList.end(), B.I,
E.I);
901 return*AttrList.front();
905 return*AttrList.front();
909 return*AttrList.back();
913 return*AttrList.back();
917 returnllvm::any_of(AttrList, [K](
const ParsedAttr*AL) {
923 autoIt = llvm::find_if(AttrList, [](
const ParsedAttr*AL) {
926 if(It != AttrList.end())
938: StringLiterals(StringLiteralBits) {}
941 if(I >= StringLiterals.size())
942 returnStringLiterals.test(StringLiterals.size() - 1);
943 returnStringLiterals.test(I);
947std::bitset<32> StringLiterals;
966assert(&
Other!=
this&&
967 "ParsedAttributes can't take attributes from itself");
969 Other.clearListOnly();
970pool.takeAllFrom(
Other.pool);
974assert(&
Other!=
this&&
975 "ParsedAttributes can't take attribute from itself");
976 Other.getPool().remove(PA);
993 ParsedAttr*
attr= pool.create(attrName, attrRange, scopeName, scopeLoc,
994args, numArgs, form, ellipsisLoc);
1007 const Expr*ReplacementExpr,
1010pool.create(attrName, attrRange, scopeName, scopeLoc, Param, introduced,
1011deprecated, obsoleted, unavailable, MessageExpr, form,
1012strict, ReplacementExpr, EnvironmentLoc);
1022 ParsedAttr*
attr= pool.create(attrName, attrRange, scopeName, scopeLoc,
1023Param1, Param2, Param3, form);
1033 ParsedTypematchingCType,
boollayoutCompatible,
1036attrName, attrRange, scopeName, scopeLoc, argumentKind, matchingCType,
1037layoutCompatible, mustBeNull, form);
1048pool.createTypeAttribute(attrName, attrRange, scopeName, scopeLoc,
1049typeArg, formUsed, ellipsisLoc);
1061attrName, attrRange, scopeName, scopeLoc, getterId, setterId, formUsed);
1073ParsedAttributes &
Result);
1132std::enable_if_t<std::is_same<ACI, AttributeCommonInfo>::value,
int> = 0>
1135DB.
AddTaggedVal(
reinterpret_cast<uint64_t
>(CI.getAttrName()),
1142std::enable_if_t<std::is_same<ACI, AttributeCommonInfo>::value,
int> = 0>
1145DB.
AddTaggedVal(
reinterpret_cast<uint64_t
>(CI->getAttrName()),
Defines the Diagnostic-related interfaces.
static Decl::Kind getKind(const Decl *D)
llvm::MachO::Target Target
Defines the clang::SourceLocation class and associated facilities.
__DEVICE__ void * memcpy(void *__a, const void *__b, size_t __c)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Combines information about the source-code form of an attribute, including its syntax and spelling.
const IdentifierInfo * getAttrName() const
Kind getParsedKind() const
A factory, from which one makes pools, from which one creates individual attributes which are dealloc...
ParsedAttr * create(IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, ArgsUnion *args, unsigned numArgs, ParsedAttr::Form form, SourceLocation ellipsisLoc=SourceLocation())
ParsedAttr * createTypeTagForDatatype(IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *argumentKind, ParsedType matchingCType, bool layoutCompatible, bool mustBeNull, ParsedAttr::Form form)
AttributePool(AttributePool &&pool)=default
Move the given pool's allocations to this pool.
AttributePool(AttributeFactory &factory)
Create a new pool for a factory.
ParsedAttr * create(IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *Param1, IdentifierLoc *Param2, IdentifierLoc *Param3, ParsedAttr::Form form)
AttributePool & operator=(AttributePool &&pool)=delete
AttributePool(const AttributePool &)=delete
AttributeFactory & getFactory() const
ParsedAttr * createPropertyAttribute(IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierInfo *getterId, IdentifierInfo *setterId, ParsedAttr::Form formUsed)
ParsedAttr * createTypeAttribute(IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, ParsedType typeArg, ParsedAttr::Form formUsed, SourceLocation ellipsisLoc)
void takeAllFrom(AttributePool &pool)
Take the given pool's allocations and add them to this pool.
ParsedAttr * create(IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *Param, const AvailabilityChange &introduced, const AvailabilityChange &deprecated, const AvailabilityChange &obsoleted, SourceLocation unavailable, const Expr *MessageExpr, ParsedAttr::Form form, SourceLocation strict, const Expr *ReplacementExpr, IdentifierLoc *EnvironmentLoc)
AttributePool & operator=(const AttributePool &)=delete
Decl - This represents one declaration (or definition), e.g.
@ ak_identifierinfo
IdentifierInfo.
This represents one expression.
One of these records is kept for each identifier that is lexed.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
ParsedAttr - Represents a syntactic attribute.
bool isPackExpansion() const
const AvailabilityChange & getAvailabilityDeprecated() const
ParsedAttr(ParsedAttr &&)=delete
LangAS asSYCLLangAS() const
If this is an OpenCL address space attribute, returns its SYCL representation in LangAS,...
IdentifierLoc * getArgAsIdent(unsigned Arg) const
bool hasParsedType() const
const AvailabilityChange & getAvailabilityIntroduced() const
void setInvalid(bool b=true) const
const ParsedAttrInfo & getInfo() const
bool hasMacroIdentifier() const
Returns true if this attribute was declared in a macro.
ParsedAttr & operator=(ParsedAttr &&)=delete
ParsedAttr & operator=(const ParsedAttr &)=delete
const Expr * getReplacementExpr() const
IdentifierInfo * getPropertyDataSetter() const
bool hasProcessingCache() const
SourceLocation getUnavailableLoc() const
unsigned getProcessingCache() const
const IdentifierLoc * getEnvironment() const
LangAS asOpenCLLangAS() const
If this is an OpenCL address space attribute, returns its representation in LangAS,...
const Expr * getMessageExpr() const
const ParsedType & getMatchingCType() const
const ParsedType & getTypeArg() const
SourceLocation getStrictLoc() const
unsigned getNumArgs() const
getNumArgs - Return the number of actual arguments to this attribute.
bool isArgIdent(unsigned Arg) const
Expr * getArgAsExpr(unsigned Arg) const
bool getMustBeNull() const
bool diagnoseMutualExclusion(class Sema &S, const Stmt *St) const
bool isUsedAsTypeAttr() const
bool isPragmaClangAttribute() const
True if the attribute is specified using '#pragma clang attribute'.
AttributeCommonInfo::Kind getKind() const
void setProcessingCache(unsigned value) const
SourceLocation getMacroExpansionLoc() const
ParsedAttr(const ParsedAttr &)=delete
bool isArgExpr(unsigned Arg) const
bool getLayoutCompatible() const
void setUsedAsTypeAttr(bool Used=true)
bool isDeclspecPropertyAttribute() const
Is this the Microsoft __declspec(property) attribute?
ArgsUnion getArg(unsigned Arg) const
getArg - Return the specified argument.
SourceLocation getEllipsisLoc() const
IdentifierInfo * getPropertyDataGetter() const
void setMacroIdentifier(IdentifierInfo *MacroName, SourceLocation Loc)
Set the macro identifier info object that this parsed attribute was declared in if it was declared in...
LangAS asHLSLLangAS() const
If this is an HLSL address space attribute, returns its representation in LangAS, otherwise returns d...
void setIsPragmaClangAttribute()
const AvailabilityChange & getAvailabilityObsoleted() const
IdentifierInfo * getMacroIdentifier() const
Return the macro identifier if this attribute was declared in a macro.
static const ParsedAttributesView & none()
const ParsedAttr & front() const
bool hasMSPropertyAttr() const
const ParsedAttr & back() const
const_iterator begin() const
const ParsedAttr * getMSPropertyAttr() const
void addAll(const_iterator B, const_iterator E)
void addAllAtEnd(const_iterator B, const_iterator E)
void addAtEnd(ParsedAttr *newAttr)
void addAll(iterator B, iterator E)
bool hasAttribute(ParsedAttr::Kind K) const
ParsedAttr & operator[](SizeType pos)
const_iterator end() const
void remove(ParsedAttr *ToBeRemoved)
const ParsedAttr & operator[](SizeType pos) const
void addAllAtEnd(iterator B, iterator E)
ParsedAttributes - A collection of parsed attributes.
ParsedAttr * addNew(IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, ArgsUnion *args, unsigned numArgs, ParsedAttr::Form form, SourceLocation ellipsisLoc=SourceLocation())
Add attribute with expression arguments.
void takeOneFrom(ParsedAttributes &Other, ParsedAttr *PA)
ParsedAttr * addNew(IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *Param1, IdentifierLoc *Param2, IdentifierLoc *Param3, ParsedAttr::Form form)
Add objc_bridge_related attribute.
AttributePool & getPool() const
ParsedAttributes & operator=(const ParsedAttributes &)=delete
ParsedAttr * addNewPropertyAttr(IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierInfo *getterId, IdentifierInfo *setterId, ParsedAttr::Form formUsed)
Add microsoft __delspec(property) attribute.
ParsedAttributes(const ParsedAttributes &)=delete
void takeAllFrom(ParsedAttributes &Other)
ParsedAttributes(AttributeFactory &factory)
ParsedAttr * addNewTypeTagForDatatype(IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *argumentKind, ParsedType matchingCType, bool layoutCompatible, bool mustBeNull, ParsedAttr::Form form)
Add type_tag_for_datatype attribute.
ParsedAttr * addNewTypeAttr(IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, ParsedType typeArg, ParsedAttr::Form formUsed, SourceLocation ellipsisLoc=SourceLocation())
Add an attribute with a single type argument.
ParsedAttributes(ParsedAttributes &&G)=default
ParsedAttr * addNew(IdentifierInfo *attrName, SourceRange attrRange, IdentifierInfo *scopeName, SourceLocation scopeLoc, IdentifierLoc *Param, const AvailabilityChange &introduced, const AvailabilityChange &deprecated, const AvailabilityChange &obsoleted, SourceLocation unavailable, const Expr *MessageExpr, ParsedAttr::Form form, SourceLocation strict, const Expr *ReplacementExpr, IdentifierLoc *EnvironmentLoc)
Add availability attribute.
Sema - This implements semantic analysis and AST building for C.
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.
Stmt - This represents one statement.
The streaming interface shared between DiagnosticBuilder and PartialDiagnostic.
void AddTaggedVal(uint64_t V, DiagnosticsEngine::ArgumentKind Kind) const
Exposes information about the current target.
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
const internal::VariadicAllOfMatcher< Attr > attr
Matches attributes.
SubjectMatchRule
A list of all the recognized kinds of attributes.
The JSON file list parser is used to communicate input to InstallAPI.
AttributeDeclKind
These constants match the enumerated choices of warn_attribute_wrong_decl_type and err_attribute_wron...
@ ExpectedParameterOrImplicitObjectParameter
@ ExpectedFunctionMethodOrParameter
@ ExpectedFunctionWithProtoType
@ ExpectedFunctionMethodOrBlock
@ ExpectedTypeOrNamespace
@ ExpectedVariableFieldOrTag
@ ExpectedVariableOrField
@ ExpectedForLoopStatement
@ ExpectedFunctionOrMethod
@ ExpectedFunctionOrClassOrEnum
@ ExpectedVariableOrFunction
@ ExpectedFunctionVariableOrClass
@ ExpectedVirtualFunction
@ ExpectedNonMemberFunction
llvm::PointerUnion< Expr *, IdentifierLoc * > ArgsUnion
A union of the various pointer types that can be passed to an ParsedAttr as an argument.
const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ASTContext::SectionInfo &Section)
Insertion operator for diagnostics.
void takeAndConcatenateAttrs(ParsedAttributes &First, ParsedAttributes &Second, ParsedAttributes &Result)
Consumes the attributes from First and Second and concatenates them into Result.
AttributeArgumentNType
These constants match the enumerated choices of err_attribute_argument_n_type and err_attribute_argum...
@ AANT_ArgumentIntegerConstant
@ AANT_ArgumentBuiltinFunction
@ AANT_ArgumentConstantExpr
@ AANT_ArgumentIdentifier
@ Result
The result type of a method or function.
LangAS
Defines the address space values used by the address space qualifier of QualType.
OpaquePtr< QualType > ParsedType
An opaque type for threading parsed type information through the parser.
@ Other
Other implicit parameter.
Represents information about a change in availability for an entity, which is part of the encoding of...
VersionTuple Version
The version number at which the change occurred.
bool isValid() const
Determine whether this availability change is valid.
SourceLocation KeywordLoc
The location of the keyword indicating the kind of change.
SourceRange VersionRange
The source range covering the version number.
Wraps an identifier and optional source location for the identifier.
unsigned AttrKind
Corresponds to the Kind enum.
ParsedAttributeArgumentsProperties(uint32_t StringLiteralBits)
bool isStringLiteralArg(unsigned I) const
const_iterator(VecTy::const_iterator I)
reference operator*() const
reference operator*() const
iterator(VecTy::iterator I)
Describes the trailing object for Availability attribute in ParsedAttr.
AvailabilityData(const AvailabilityChange &Introduced, const AvailabilityChange &Deprecated, const AvailabilityChange &Obsoleted, SourceLocation Strict, const Expr *ReplaceExpr, const IdentifierLoc *EnvironmentLoc)
const IdentifierLoc * EnvironmentLoc
AvailabilityChange Changes[NumAvailabilitySlots]
PropertyData(IdentifierInfo *getterId, IdentifierInfo *setterId)
IdentifierInfo * GetterId
unsigned LayoutCompatible
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