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"
107using ArgsUnion = llvm::PointerUnion<Expr *, IdentifierLoc *>;
121 private llvm::TrailingObjects<
122 ParsedAttr, ArgsUnion, detail::AvailabilityData,
123 detail::TypeTagForDatatypeData, ParsedType, detail::PropertyData> {
124 friend TrailingObjects;
126 size_t numTrailingObjects(OverloadToken<ArgsUnion>)
const {
return NumArgs; }
127 size_t numTrailingObjects(OverloadToken<detail::AvailabilityData>)
const {
128 return IsAvailability;
131 numTrailingObjects(OverloadToken<detail::TypeTagForDatatypeData>)
const {
132 return IsTypeTagForDatatype;
134 size_t numTrailingObjects(OverloadToken<ParsedType>)
const {
135 return HasParsedType;
137 size_t numTrailingObjects(OverloadToken<detail::PropertyData>)
const {
148 unsigned NumArgs : 16;
151 mutable unsigned Invalid : 1;
154 mutable unsigned UsedAsTypeAttr : 1;
158 unsigned IsAvailability : 1;
162 unsigned IsTypeTagForDatatype : 1;
166 unsigned IsProperty : 1;
169 unsigned HasParsedType : 1;
172 mutable unsigned HasProcessingCache : 1;
175 mutable unsigned ProcessingCache : 8;
178 mutable unsigned IsPragmaClangAttribute : 1;
184 const Expr *MessageExpr;
188 ArgsUnion *getArgsBuffer() {
return getTrailingObjects<ArgsUnion>(); }
190 return getTrailingObjects<ArgsUnion>();
194 return getTrailingObjects<detail::AvailabilityData>();
197 return getTrailingObjects<detail::AvailabilityData>();
210 EllipsisLoc(ellipsisLoc), NumArgs(numArgs), Invalid(
false),
213 HasProcessingCache(
false), IsPragmaClangAttribute(
false),
226 const Expr *replacementExpr)
228 NumArgs(1), Invalid(
false), UsedAsTypeAttr(
false), IsAvailability(
true),
230 HasProcessingCache(
false), IsPragmaClangAttribute(
false),
231 UnavailableLoc(unavailable), MessageExpr(messageExpr),
236 introduced, deprecated, obsoleted, strict, replacementExpr);
240 ParsedAttr(IdentifierInfo *attrName, SourceRange attrRange,
241 IdentifierInfo *scopeName, SourceLocation scopeLoc,
242 IdentifierLoc *Parm1, IdentifierLoc *Parm2, IdentifierLoc *Parm3,
244 : AttributeCommonInfo(attrName, scopeName, attrRange, scopeLoc, formUsed),
245 NumArgs(3), Invalid(
false), UsedAsTypeAttr(
false),
247 HasParsedType(
false), HasProcessingCache(
false),
248 IsPragmaClangAttribute(
false), Info(ParsedAttrInfo::get(*this)) {
256 ParsedAttr(IdentifierInfo *attrName, SourceRange attrRange,
257 IdentifierInfo *scopeName, SourceLocation scopeLoc,
258 IdentifierLoc *ArgKind,
ParsedType matchingCType,
259 bool layoutCompatible,
bool mustBeNull, Form formUsed)
261 NumArgs(1), Invalid(
false), UsedAsTypeAttr(
false),
262 IsAvailability(
false), IsTypeTagForDatatype(
true), IsProperty(
false),
263 HasParsedType(
false), HasProcessingCache(
false),
264 IsPragmaClangAttribute(
false), Info(ParsedAttrInfo::get(*this)) {
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 IdentifierInfo *scopeName, SourceLocation scopeLoc,
276 ParsedType typeArg, Form formUsed, SourceLocation ellipsisLoc)
278 EllipsisLoc(ellipsisLoc), NumArgs(0), Invalid(
false),
280 IsTypeTagForDatatype(
false), IsProperty(
false), HasParsedType(
true),
281 HasProcessingCache(
false), IsPragmaClangAttribute(
false),
282 Info(ParsedAttrInfo::get(*this)) {
287 ParsedAttr(IdentifierInfo *attrName, SourceRange attrRange,
288 IdentifierInfo *scopeName, SourceLocation scopeLoc,
289 IdentifierInfo *getterId, IdentifierInfo *setterId, Form formUsed)
291 NumArgs(0), Invalid(
false), UsedAsTypeAttr(
false),
292 IsAvailability(
false), IsTypeTagForDatatype(
false), IsProperty(
true),
293 HasParsedType(
false), HasProcessingCache(
false),
294 IsPragmaClangAttribute(
false), 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 &&
getArg(Arg).is<
Expr*>();
397 "Not an availability attribute");
403 "Not an availability attribute");
409 "Not an availability attribute");
415 "Not an availability attribute");
421 "Not an availability attribute");
422 return UnavailableLoc;
427 "Not an availability attribute");
433 "Not an availability attribute");
439 "Not a type_tag_for_datatype attribute");
445 "Not a type_tag_for_datatype attribute");
451 "Not a type_tag_for_datatype attribute");
452 return getTypeTagForDatatypeDataSlot().
MustBeNull;
456 assert(HasParsedType &&
"Not a type attribute");
457 return getTypeBuffer();
462 "Not a __delcspec(property) attribute");
463 return getPropertyDataBuffer().
GetterId;
468 "Not a __delcspec(property) attribute");
469 return getPropertyDataBuffer().
SetterId;
477 MacroExpansionLoc = Loc;
489 "if this attribute has a macro identifier.");
490 return MacroExpansionLoc;
556 case ParsedAttr::AT_OpenCLConstantAddressSpace:
558 case ParsedAttr::AT_OpenCLGlobalAddressSpace:
560 case ParsedAttr::AT_OpenCLGlobalDeviceAddressSpace:
562 case ParsedAttr::AT_OpenCLGlobalHostAddressSpace:
564 case ParsedAttr::AT_OpenCLLocalAddressSpace:
566 case ParsedAttr::AT_OpenCLPrivateAddressSpace:
568 case ParsedAttr::AT_OpenCLGenericAddressSpace:
579 case ParsedAttr::AT_OpenCLGlobalAddressSpace:
581 case ParsedAttr::AT_OpenCLGlobalDeviceAddressSpace:
583 case ParsedAttr::AT_OpenCLGlobalHostAddressSpace:
585 case ParsedAttr::AT_OpenCLLocalAddressSpace:
587 case ParsedAttr::AT_OpenCLPrivateAddressSpace:
589 case ParsedAttr::AT_OpenCLGenericAddressSpace:
599 case ParsedAttr::AT_HLSLGroupSharedAddressSpace:
642 InlineFreeListsCapacity =
646 llvm::BumpPtrAllocator Alloc;
650 SmallVector<SmallVector<ParsedAttr *, 8>, InlineFreeListsCapacity> FreeLists;
656 void *allocate(
size_t size);
678 void *allocate(
size_t size) {
679 return Factory.allocate(size);
683 Attrs.push_back(attr);
687 void remove(ParsedAttr *attr) {
688 assert(llvm::is_contained(Attrs, attr) &&
689 "Can't take attribute from a pool that doesn't own it!");
690 Attrs.erase(llvm::find(Attrs, attr));
693 void takePool(AttributePool &pool);
716 Factory.reclaimPool(*
this);
735 void *memory = allocate(
740 return add(
new (memory)
ParsedAttr(attrName, attrRange, scopeName, scopeLoc,
741 args, numArgs, form, ellipsisLoc));
751 const Expr *ReplacementExpr) {
754 attrName, attrRange, scopeName, scopeLoc, Param, introduced, deprecated,
755 obsoleted, unavailable, MessageExpr, form, strict, ReplacementExpr));
762 void *memory = allocate(
766 return add(
new (memory)
ParsedAttr(attrName, attrRange, scopeName, scopeLoc,
767 Param1, Param2, Param3, form));
774 ParsedType matchingCType,
bool layoutCompatible,
777 return add(
new (memory)
ParsedAttr(attrName, attrRange, scopeName, scopeLoc,
778 argumentKind, matchingCType,
779 layoutCompatible, mustBeNull, form));
788 void *memory = allocate(
792 return add(
new (memory)
ParsedAttr(attrName, attrRange, scopeName, scopeLoc,
793 typeArg, formUsed, ellipsisLoc));
802 return add(
new (memory)
ParsedAttr(attrName, attrRange, scopeName, scopeLoc,
803 getterId, setterId, formUsed));
809 using SizeType =
decltype(std::declval<VecTy>().size());
819 bool empty()
const {
return AttrList.empty(); }
820 SizeType
size()
const {
return AttrList.size(); }
826 AttrList.push_back(newAttr);
830 assert(is_contained(AttrList, ToBeRemoved) &&
831 "Cannot remove attribute that isn't in the list");
832 AttrList.erase(llvm::find(AttrList, ToBeRemoved));
837 struct iterator : llvm::iterator_adaptor_base<iterator, VecTy::iterator,
838 std::random_access_iterator_tag,
841 iterator(VecTy::iterator I) : iterator_adaptor_base(I) {}
846 : llvm::iterator_adaptor_base<const_iterator, VecTy::const_iterator,
847 std::random_access_iterator_tag,
857 AttrList.insert(AttrList.begin(), B.I, E.I);
861 AttrList.insert(AttrList.begin(), B.I, E.I);
865 AttrList.insert(AttrList.end(), B.I, E.I);
869 AttrList.insert(AttrList.end(), B.I, E.I);
879 return *AttrList.front();
883 return *AttrList.front();
887 return *AttrList.back();
891 return *AttrList.back();
895 return llvm::any_of(AttrList, [K](
const ParsedAttr *AL) {
901 auto It = llvm::find_if(AttrList, [](
const ParsedAttr *AL) {
904 if (It != AttrList.end())
929 assert(&Other !=
this &&
930 "ParsedAttributes can't take attributes from itself");
931 addAll(Other.begin(), Other.end());
932 Other.clearListOnly();
937 assert(&Other !=
this &&
938 "ParsedAttributes can't take attribute from itself");
939 Other.getPool().remove(PA);
957 args, numArgs, form, ellipsisLoc);
970 const Expr *ReplacementExpr) {
972 attrName, attrRange, scopeName, scopeLoc, Param, introduced, deprecated,
973 obsoleted, unavailable, MessageExpr, form, strict, ReplacementExpr);
984 Param1, Param2, Param3, form);
994 ParsedType matchingCType,
bool layoutCompatible,
997 attrName, attrRange, scopeName, scopeLoc, argumentKind, matchingCType,
998 layoutCompatible, mustBeNull, form);
1010 typeArg, formUsed, ellipsisLoc);
1022 attrName, attrRange, scopeName, scopeLoc, getterId, setterId, formUsed);
1034 ParsedAttributes &
Result);
1086 std::enable_if_t<std::is_same<ACI, AttributeCommonInfo>::value,
int> = 0>
1089 DB.
AddTaggedVal(
reinterpret_cast<uint64_t
>(CI.getAttrName()),
1096 std::enable_if_t<std::is_same<ACI, AttributeCommonInfo>::value,
int> = 0>
1099 DB.
AddTaggedVal(
reinterpret_cast<uint64_t
>(CI->getAttrName()),
Defines the Diagnostic-related interfaces.
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, const IdentifierInfo *ScopeName, SourceRange AttrRange, SourceLocation ScopeLoc, Kind AttrKind, Form FormUsed)
const IdentifierInfo * getAttrName() const
Kind getParsedKind() const
A factory, from which one makes pools, from which one creates individual attributes which are dealloc...
@ TypeTagForDatatypeAllocSize
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 * 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)
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.
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
bool isTargetSpecificAttr() const
bool hasCustomParsing() const
ParsedAttr(ParsedAttr &&)=delete
LangAS asSYCLLangAS() const
If this is an OpenCL address space attribute, returns its SYCL representation in LangAS,...
unsigned getSemanticSpelling() const
If the parsed attribute has a semantic equivalent, and it would have a semantic Spelling enumeration ...
bool appliesToDecl(const Decl *D, attr::SubjectMatchRule MatchRule) const
bool isKnownToGCC() const
bool existsInTarget(const TargetInfo &Target) const
unsigned getMinArgs() const
bool checkExactlyNumArgs(class Sema &S, unsigned Num) const
Check if the attribute has exactly as many args as Num.
IdentifierLoc * getArgAsIdent(unsigned Arg) const
bool hasParsedType() const
const AvailabilityChange & getAvailabilityIntroduced() const
void setInvalid(bool b=true) const
bool hasVariadicArg() 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
void handleAttrWithDelayedArgs(Sema &S, Decl *D) const
const Expr * getReplacementExpr() const
IdentifierInfo * getPropertyDataSetter() const
bool diagnoseMutualExclusion(class Sema &S, const Decl *D) const
bool hasProcessingCache() const
SourceLocation getUnavailableLoc() const
bool diagnoseAppertainsTo(class Sema &S, const Decl *D) const
unsigned getProcessingCache() const
LangAS asOpenCLLangAS() const
If this is an OpenCL address space attribute, returns its representation in LangAS,...
bool acceptsExprPack() const
const Expr * getMessageExpr() const
const ParsedType & getMatchingCType() const
const ParsedType & getTypeArg() const
SourceLocation getStrictLoc() const
bool isSupportedByPragmaAttribute() 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 checkAtLeastNumArgs(class Sema &S, unsigned Num) const
Check if the attribute has at least as many args as Num.
bool isUsedAsTypeAttr() const
unsigned getNumArgMembers() const
unsigned getMaxArgs() const
bool isPragmaClangAttribute() const
True if the attribute is specified using '#pragma clang attribute'.
bool slidesFromDeclToDeclSpecLegacyBehavior() const
Returns whether a [[]] attribute, if specified ahead of a declaration, should be applied to the decl-...
AttributeCommonInfo::Kind getKind() const
void setProcessingCache(unsigned value) const
SourceLocation getMacroExpansionLoc() const
ParsedAttr(const ParsedAttr &)=delete
void getMatchRules(const LangOptions &LangOpts, SmallVectorImpl< std::pair< attr::SubjectMatchRule, bool > > &MatchRules) const
bool isParamExpr(size_t N) const
bool isArgExpr(unsigned Arg) const
bool getLayoutCompatible() const
void setUsedAsTypeAttr(bool Used=true)
bool isDeclspecPropertyAttribute() const
Is this the Microsoft __declspec(property) attribute?
bool diagnoseLangOpts(class Sema &S) const
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()
bool checkAtMostNumArgs(class Sema &S, unsigned Num) const
Check if the attribute has at most as many args as Num.
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
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)
Add availability attribute.
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.
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.
AttributeDeclKind
These constants match the enumerated choices of warn_attribute_wrong_decl_type and err_attribute_wron...
@ ExpectedFunctionMethodOrParameter
@ ExpectedFunctionWithProtoType
@ ExpectedFunctionMethodOrBlock
@ ExpectedTypeOrNamespace
@ ExpectedVariableFieldOrTag
@ ExpectedVariableOrField
@ ExpectedFunctionOrMethod
@ ExpectedVariableOrFunction
@ ExpectedFunctionVariableOrClass
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.
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.
static IdentifierLoc * create(ASTContext &Ctx, SourceLocation Loc, IdentifierInfo *Ident)
unsigned AttrKind
Corresponds to the Kind enum.
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)
AvailabilityChange Changes[NumAvailabilitySlots]
IdentifierInfo * SetterId
PropertyData(IdentifierInfo *getterId, IdentifierInfo *setterId)
IdentifierInfo * GetterId
unsigned LayoutCompatible