14#ifndef LLVM_CLANG_SEMA_PARSEDATTR_H
15#define LLVM_CLANG_SEMA_PARSEDATTR_H
23#include "llvm/ADT/PointerUnion.h"
24#include "llvm/ADT/SmallVector.h"
25#include "llvm/Support/Allocator.h"
26#include "llvm/Support/VersionTuple.h"
87 LLVM_PREFERRED_TYPE(
bool)
89 LLVM_PREFERRED_TYPE(
bool)
103using ArgsUnion = llvm::PointerUnion<Expr *, IdentifierLoc *>;
115class ParsedAttr final
117 private llvm::TrailingObjects<
118 ParsedAttr, ArgsUnion, detail::AvailabilityData,
119 detail::TypeTagForDatatypeData, ParsedType, detail::PropertyData> {
120 friend TrailingObjects;
122 size_t numTrailingObjects(OverloadToken<ArgsUnion>)
const {
return NumArgs; }
123 size_t numTrailingObjects(OverloadToken<detail::AvailabilityData>)
const {
124 return IsAvailability;
127 numTrailingObjects(OverloadToken<detail::TypeTagForDatatypeData>)
const {
128 return IsTypeTagForDatatype;
130 size_t numTrailingObjects(OverloadToken<ParsedType>)
const {
131 return HasParsedType;
141 unsigned NumArgs : 16;
144 LLVM_PREFERRED_TYPE(
bool)
145 mutable unsigned Invalid : 1;
148 LLVM_PREFERRED_TYPE(
bool)
149 mutable unsigned UsedAsTypeAttr : 1;
153 LLVM_PREFERRED_TYPE(
bool)
154 unsigned IsAvailability : 1;
158 LLVM_PREFERRED_TYPE(
bool)
159 unsigned IsTypeTagForDatatype : 1;
163 LLVM_PREFERRED_TYPE(
bool)
164 unsigned IsProperty : 1;
167 LLVM_PREFERRED_TYPE(
bool)
168 unsigned HasParsedType : 1;
171 LLVM_PREFERRED_TYPE(
bool)
172 mutable unsigned HasProcessingCache : 1;
175 mutable unsigned ProcessingCache : 8;
178 LLVM_PREFERRED_TYPE(
bool)
179 mutable unsigned IsPragmaClangAttribute : 1;
185 const Expr *MessageExpr;
189 ArgsUnion *getArgsBuffer() {
return getTrailingObjects<ArgsUnion>(); }
191 return getTrailingObjects<ArgsUnion>();
195 return getTrailingObjects<detail::AvailabilityData>();
198 return getTrailingObjects<detail::AvailabilityData>();
210 EllipsisLoc(ellipsisLoc), NumArgs(numArgs), Invalid(
false),
213 HasProcessingCache(
false), IsPragmaClangAttribute(
false),
230 HasProcessingCache(
false), IsPragmaClangAttribute(
false),
231 UnavailableLoc(unavailable), MessageExpr(messageExpr),
235 new (getAvailabilityData())
237 replacementExpr, environmentLoc);
241 ParsedAttr(IdentifierInfo *attrName, SourceRange attrRange,
242 AttributeScopeInfo scope, IdentifierLoc *Parm1,
243 IdentifierLoc *Parm2, IdentifierLoc *Parm3, Form formUsed)
244 : AttributeCommonInfo(attrName, scope, attrRange, formUsed), NumArgs(3),
247 HasProcessingCache(
false), IsPragmaClangAttribute(
false),
248 Info(ParsedAttrInfo::get(*this)) {
249 ArgsUnion *Args = getArgsBuffer();
256 ParsedAttr(IdentifierInfo *attrName, SourceRange attrRange,
257 AttributeScopeInfo scope, IdentifierLoc *ArgKind,
258 ParsedType matchingCType,
bool layoutCompatible,
bool mustBeNull,
260 : AttributeCommonInfo(attrName, scope, attrRange, formUsed), NumArgs(1),
262 IsTypeTagForDatatype(
true), IsProperty(
false), HasParsedType(
false),
263 HasProcessingCache(
false), IsPragmaClangAttribute(
false),
264 Info(ParsedAttrInfo::get(*this)) {
266 memcpy(getArgsBuffer(), &PVal,
sizeof(ArgsUnion));
267 detail::TypeTagForDatatypeData &ExtraData = getTypeTagForDatatypeDataSlot();
268 new (&ExtraData.MatchingCType)
ParsedType(matchingCType);
269 ExtraData.LayoutCompatible = layoutCompatible;
270 ExtraData.MustBeNull = mustBeNull;
274 ParsedAttr(IdentifierInfo *attrName, SourceRange attrRange,
275 AttributeScopeInfo scope, ParsedType typeArg, Form formUsed,
276 SourceLocation ellipsisLoc)
277 : AttributeCommonInfo(attrName, scope, attrRange, formUsed),
280 IsTypeTagForDatatype(
false), IsProperty(
false), HasParsedType(
true),
281 HasProcessingCache(
false), IsPragmaClangAttribute(
false),
282 Info(ParsedAttrInfo::get(*this)) {
287 ParsedAttr(IdentifierInfo *attrName, SourceRange attrRange,
288 AttributeScopeInfo scope, IdentifierInfo *getterId,
289 IdentifierInfo *setterId, Form formUsed)
290 : AttributeCommonInfo(attrName, scope, attrRange, formUsed), NumArgs(0),
292 IsTypeTagForDatatype(
false), IsProperty(
true), HasParsedType(
false),
293 HasProcessingCache(
false), IsPragmaClangAttribute(
false),
294 Info(ParsedAttrInfo::get(*this)) {
295 new (&getPropertyDataBuffer()) detail::PropertyData(getterId, setterId);
301 detail::TypeTagForDatatypeData &getTypeTagForDatatypeDataSlot() {
302 return *getTrailingObjects<detail::TypeTagForDatatypeData>();
304 const detail::TypeTagForDatatypeData &getTypeTagForDatatypeDataSlot()
const {
305 return *getTrailingObjects<detail::TypeTagForDatatypeData>();
310 ParsedType &getTypeBuffer() {
return *getTrailingObjects<ParsedType>(); }
312 return *getTrailingObjects<ParsedType>();
317 detail::PropertyData &getPropertyDataBuffer() {
319 return *getTrailingObjects<detail::PropertyData>();
321 const detail::PropertyData &getPropertyDataBuffer()
const {
323 return *getTrailingObjects<detail::PropertyData>();
326 size_t allocated_size()
const;
335 void operator delete(
void *) =
delete;
351 return ProcessingCache;
355 ProcessingCache = value;
356 HasProcessingCache =
true;
375 assert(Arg < NumArgs &&
"Arg access out of range!");
376 return getArgsBuffer()[Arg];
380 return Arg < NumArgs && isa<Expr *>(
getArg(Arg));
386 return Arg < NumArgs && isa<IdentifierLoc *>(
getArg(Arg));
395 "Not an availability attribute");
401 "Not an availability attribute");
407 "Not an availability attribute");
413 "Not an availability attribute");
414 return getAvailabilityData()->StrictLoc;
419 "Not an availability attribute");
420 return UnavailableLoc;
425 "Not an availability attribute");
431 "Not an availability attribute");
432 return getAvailabilityData()->Replacement;
437 "Not an availability attribute");
438 return getAvailabilityData()->EnvironmentLoc;
443 "Not a type_tag_for_datatype attribute");
444 return getTypeTagForDatatypeDataSlot().MatchingCType;
449 "Not a type_tag_for_datatype attribute");
450 return getTypeTagForDatatypeDataSlot().LayoutCompatible;
455 "Not a type_tag_for_datatype attribute");
456 return getTypeTagForDatatypeDataSlot().MustBeNull;
460 assert(HasParsedType &&
"Not a type attribute");
461 return getTypeBuffer();
466 "Not a __delcspec(property) attribute");
467 return getPropertyDataBuffer().GetterId;
472 "Not a __delcspec(property) attribute");
473 return getPropertyDataBuffer().SetterId;
481 MacroExpansionLoc = Loc;
493 "if this attribute has a macro identifier.");
494 return MacroExpansionLoc;
499 bool checkExactlyNumArgs(
class Sema &S,
unsigned Num)
const;
502 bool checkAtLeastNumArgs(
class Sema &S,
unsigned Num)
const;
505 bool checkAtMostNumArgs(
class Sema &S,
unsigned Num)
const;
507 bool isTargetSpecificAttr()
const;
508 bool isTypeAttr()
const;
509 bool isStmtAttr()
const;
511 bool hasCustomParsing()
const;
512 bool acceptsExprPack()
const;
513 bool isParamExpr(
size_t N)
const;
514 unsigned getMinArgs()
const;
515 unsigned getMaxArgs()
const;
516 unsigned getNumArgMembers()
const;
517 bool hasVariadicArg()
const;
518 void handleAttrWithDelayedArgs(
Sema &S,
Decl *D)
const;
519 bool diagnoseAppertainsTo(
class Sema &S,
const Decl *D)
const;
520 bool diagnoseAppertainsTo(
class Sema &S,
const Stmt *St)
const;
521 bool diagnoseMutualExclusion(
class Sema &S,
const Decl *D)
const;
532 bool diagnoseLangOpts(
class Sema &S)
const;
534 bool isKnownToGCC()
const;
535 bool isSupportedByPragmaAttribute()
const;
547 bool slidesFromDeclToDeclSpecLegacyBehavior()
const;
554 unsigned getSemanticSpelling()
const;
560 case ParsedAttr::AT_OpenCLConstantAddressSpace:
562 case ParsedAttr::AT_OpenCLGlobalAddressSpace:
564 case ParsedAttr::AT_OpenCLGlobalDeviceAddressSpace:
566 case ParsedAttr::AT_OpenCLGlobalHostAddressSpace:
568 case ParsedAttr::AT_OpenCLLocalAddressSpace:
570 case ParsedAttr::AT_OpenCLPrivateAddressSpace:
572 case ParsedAttr::AT_OpenCLGenericAddressSpace:
583 case ParsedAttr::AT_OpenCLGlobalAddressSpace:
585 case ParsedAttr::AT_OpenCLGlobalDeviceAddressSpace:
587 case ParsedAttr::AT_OpenCLGlobalHostAddressSpace:
589 case ParsedAttr::AT_OpenCLLocalAddressSpace:
591 case ParsedAttr::AT_OpenCLPrivateAddressSpace:
593 case ParsedAttr::AT_OpenCLGenericAddressSpace:
603 case ParsedAttr::AT_HLSLGroupSharedAddressSpace:
646 InlineFreeListsCapacity =
647 1 + (AvailabilityAllocSize -
sizeof(
ParsedAttr)) /
sizeof(
void *)
650 llvm::BumpPtrAllocator Alloc;
660 void *allocate(
size_t size);
683 void *allocate(
size_t size) {
684 return Factory.allocate(size);
688 Attrs.push_back(
attr);
692 void remove(ParsedAttr *attr) {
693 assert(llvm::is_contained(Attrs, attr) &&
694 "Can't take attribute from a pool that doesn't own it!");
695 Attrs.erase(llvm::find(Attrs, attr));
698 void takePool(AttributePool &pool);
721 Factory.reclaimPool(*
this);
739 void *memory = allocate(
744 return add(
new (memory)
ParsedAttr(attrName, attrRange, scope, args,
745 numArgs, form, ellipsisLoc));
755 const Expr *ReplacementExpr,
758 return add(
new (memory)
759 ParsedAttr(attrName, attrRange, scope, Param, introduced,
760 deprecated, obsoleted, unavailable, MessageExpr,
761 form, strict, ReplacementExpr, EnvironmentLoc));
768 void *memory = allocate(
772 return add(
new (memory)
ParsedAttr(attrName, attrRange, scope, Param1,
773 Param2, Param3, form));
781 return add(
new (memory)
ParsedAttr(attrName, attrRange, scope, argumentKind,
782 matchingCType, layoutCompatible,
791 void *memory = allocate(
795 return add(
new (memory)
ParsedAttr(attrName, attrRange, scope, typeArg,
796 formUsed, ellipsisLoc));
804 return add(
new (memory)
ParsedAttr(attrName, attrRange, scope, getterId,
805 setterId, formUsed));
812 using SizeType =
decltype(std::declval<VecTy>().size());
822 bool empty()
const {
return AttrList.empty(); }
823 SizeType
size()
const {
return AttrList.size(); }
829 AttrList.push_back(newAttr);
833 assert(is_contained(AttrList, ToBeRemoved) &&
834 "Cannot remove attribute that isn't in the list");
835 AttrList.erase(llvm::find(AttrList, ToBeRemoved));
840 struct iterator : llvm::iterator_adaptor_base<iterator, VecTy::iterator,
841 std::random_access_iterator_tag,
844 iterator(VecTy::iterator I) : iterator_adaptor_base(I) {}
849 : llvm::iterator_adaptor_base<const_iterator, VecTy::const_iterator,
850 std::random_access_iterator_tag,
860 AttrList.insert(AttrList.begin(), B.I, E.I);
864 AttrList.insert(AttrList.begin(), B.I, E.I);
868 AttrList.insert(AttrList.end(), B.I, E.I);
872 AttrList.insert(AttrList.end(), B.I, E.I);
882 return *AttrList.front();
886 return *AttrList.front();
890 return *AttrList.back();
894 return *AttrList.back();
898 return llvm::any_of(AttrList, [K](
const ParsedAttr *AL) {
904 auto It = llvm::find_if(AttrList, [](
const ParsedAttr *AL) {
907 if (It != AttrList.end())
919 : StringLiterals(StringLiteralBits) {}
922 if (I >= StringLiterals.size())
923 return StringLiterals.test(StringLiterals.size() - 1);
924 return StringLiterals.test(I);
928 std::bitset<32> StringLiterals;
947 assert(&
Other !=
this &&
948 "ParsedAttributes can't take attributes from itself");
950 Other.clearListOnly();
951 pool.takeAllFrom(
Other.pool);
955 assert(&
Other !=
this &&
956 "ParsedAttributes can't take attributes from itself");
958 Other.clearListOnly();
959 pool.takeAllFrom(
Other.pool);
963 assert(&
Other !=
this &&
964 "ParsedAttributes can't take attribute from itself");
965 Other.getPool().remove(PA);
982 ParsedAttr *
attr = pool.create(attrName, attrRange, scope, args, numArgs,
996 const Expr *ReplacementExpr,
999 pool.create(attrName, attrRange, scope, Param, introduced, deprecated,
1000 obsoleted, unavailable, MessageExpr, form, strict,
1001 ReplacementExpr, EnvironmentLoc);
1012 pool.create(attrName, attrRange, scope, Param1, Param2, Param3, form);
1023 attrName, attrRange, scope, argumentKind, matchingCType,
1024 layoutCompatible, mustBeNull, form);
1034 ParsedAttr *
attr = pool.createTypeAttribute(attrName, attrRange, scope,
1035 typeArg, formUsed, ellipsisLoc);
1046 attrName, attrRange, scope, getterId, setterId, formUsed);
1059 ParsedAttributes &&Second);
Defines the Diagnostic-related interfaces.
static Decl::Kind getKind(const Decl *D)
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 ...
AttributeCommonInfo(const IdentifierInfo *AttrName, AttributeScopeInfo AttrScope, SourceRange AttrRange, Kind AttrKind, Form FormUsed)
Kind getParsedKind() const
A factory, from which one makes pools, from which one creates individual attributes which are dealloc...
friend class AttributePool
@ TypeTagForDatatypeAllocSize
ParsedAttr * create(IdentifierInfo *attrName, SourceRange attrRange, AttributeScopeInfo scope, ArgsUnion *args, unsigned numArgs, ParsedAttr::Form form, SourceLocation ellipsisLoc=SourceLocation())
ParsedAttr * create(IdentifierInfo *attrName, SourceRange attrRange, AttributeScopeInfo scope, 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)
friend class ParsedAttributes
AttributePool(AttributePool &&pool)=default
Move the given pool's allocations to this pool.
AttributePool(AttributeFactory &factory)
Create a new pool for a factory.
ParsedAttr * createTypeAttribute(IdentifierInfo *attrName, SourceRange attrRange, AttributeScopeInfo scope, ParsedType typeArg, ParsedAttr::Form formUsed, SourceLocation ellipsisLoc)
AttributePool & operator=(AttributePool &&pool)=delete
AttributePool(const AttributePool &)=delete
ParsedAttr * createTypeTagForDatatype(IdentifierInfo *attrName, SourceRange attrRange, AttributeScopeInfo scope, IdentifierLoc *argumentKind, ParsedType matchingCType, bool layoutCompatible, bool mustBeNull, ParsedAttr::Form form)
AttributeFactory & getFactory() const
ParsedAttr * create(IdentifierInfo *attrName, SourceRange attrRange, AttributeScopeInfo scope, IdentifierLoc *Param1, IdentifierLoc *Param2, IdentifierLoc *Param3, ParsedAttr::Form form)
friend class AttributeFactory
void takeAllFrom(AttributePool &pool)
Take the given pool's allocations and add them to this pool.
ParsedAttr * createPropertyAttribute(IdentifierInfo *attrName, SourceRange attrRange, AttributeScopeInfo scope, IdentifierInfo *getterId, IdentifierInfo *setterId, ParsedAttr::Form formUsed)
AttributePool & operator=(const AttributePool &)=delete
Decl - This represents one declaration (or definition), e.g.
This represents one expression.
One of these records is kept for each identifier that is lexed.
A simple pair of identifier info and location.
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
friend class AttributePool
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?
friend class AttributeFactory
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()
friend class AttributePool
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)
ParsedAttr * addNew(IdentifierInfo *attrName, SourceRange attrRange, AttributeScopeInfo scope, 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.
void takeOneFrom(ParsedAttributes &Other, ParsedAttr *PA)
AttributePool & getPool() const
ParsedAttributes & operator=(const ParsedAttributes &)=delete
ParsedAttr * addNewPropertyAttr(IdentifierInfo *attrName, SourceRange attrRange, AttributeScopeInfo scope, IdentifierInfo *getterId, IdentifierInfo *setterId, ParsedAttr::Form formUsed)
Add microsoft __delspec(property) attribute.
ParsedAttributes(const ParsedAttributes &)=delete
ParsedAttr * addNewTypeAttr(IdentifierInfo *attrName, SourceRange attrRange, AttributeScopeInfo scope, ParsedType typeArg, ParsedAttr::Form formUsed, SourceLocation ellipsisLoc=SourceLocation())
Add an attribute with a single type argument.
void takeAllFrom(ParsedAttributes &Other)
void takeAllAtEndFrom(ParsedAttributes &Other)
ParsedAttr * addNew(IdentifierInfo *attrName, SourceRange attrRange, AttributeScopeInfo scope, IdentifierLoc *Param1, IdentifierLoc *Param2, IdentifierLoc *Param3, ParsedAttr::Form form)
Add objc_bridge_related attribute.
ParsedAttributes(AttributeFactory &factory)
ParsedAttr * addNewTypeTagForDatatype(IdentifierInfo *attrName, SourceRange attrRange, AttributeScopeInfo scope, IdentifierLoc *argumentKind, ParsedType matchingCType, bool layoutCompatible, bool mustBeNull, ParsedAttr::Form form)
Add type_tag_for_datatype attribute.
ParsedAttributes(ParsedAttributes &&G)=default
ParsedAttr * addNew(IdentifierInfo *attrName, SourceRange attrRange, AttributeScopeInfo scope, ArgsUnion *args, unsigned numArgs, ParsedAttr::Form form, SourceLocation ellipsisLoc=SourceLocation())
Add attribute with expression arguments.
Sema - This implements semantic analysis and AST building for C.
Encodes a location in the source.
A trivial tuple used to represent a source range.
Stmt - This represents one statement.
Exposes information about the current target.
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.
nullptr
This class represents a compute construct, representing a 'Kind' of ‘parallel’, 'serial',...
llvm::SmallVector< ArgsUnion, 12U > ArgsVector
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
LangAS
Defines the address space values used by the address space qualifier of QualType.
void takeAndConcatenateAttrs(ParsedAttributes &First, ParsedAttributes &&Second)
Consumes the attributes from Second and concatenates them at the end of First.
U cast(CodeGen::Address addr)
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.
ParsedAttributeArgumentsProperties(uint32_t StringLiteralBits)
bool isStringLiteralArg(unsigned I) const
friend class ParsedAttributesView
const_iterator(VecTy::const_iterator I)
reference operator*() const
friend class ParsedAttributesView
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]
IdentifierInfo * SetterId
PropertyData(IdentifierInfo *getterId, IdentifierInfo *setterId)
IdentifierInfo * GetterId
unsigned LayoutCompatible