}
def AddressSpace : TypeAttr {
- let Spellings = [Clang<"address_space">];
+ let Spellings = [Clang<"address_space", 1>];
let Args = [IntArgument<"AddressSpace">];
let Documentation = [Undocumented];
}
}
def XRayInstrument : InheritableAttr {
- let Spellings = [Clang<"xray_always_instrument">,
- Clang<"xray_never_instrument">];
+ let Spellings = [Clang<"xray_always_instrument", 1>,
+ Clang<"xray_never_instrument", 1>];
let Subjects = SubjectList<[Function, ObjCMethod]>;
let Accessors = [Accessor<"alwaysXRayInstrument",
- [Clang<"xray_always_instrument">]>,
+ [Clang<"xray_always_instrument", 1>]>,
Accessor<"neverXRayInstrument",
- [Clang<"xray_never_instrument">]>];
+ [Clang<"xray_never_instrument", 1>]>];
let Documentation = [XRayDocs];
}
def XRayLogArgs : InheritableAttr {
- let Spellings = [Clang<"xray_log_args">];
+ let Spellings = [Clang<"xray_log_args", 1>];
let Subjects = SubjectList<[Function, ObjCMethod]>;
let Args = [UnsignedArgument<"ArgumentCount">];
let Documentation = [XRayDocs];
}
def Blocks : InheritableAttr {
- let Spellings = [Clang<"blocks">];
+ let Spellings = [Clang<"blocks", 1>];
let Args = [EnumArgument<"Type", "BlockType", ["byref"], ["ByRef"]>];
let Documentation = [Undocumented];
}
}
def MinSize : InheritableAttr {
- let Spellings = [Clang<"minsize">];
+ let Spellings = [Clang<"minsize", 1>];
let Subjects = SubjectList<[Function, ObjCMethod], ErrorDiag>;
let Documentation = [Undocumented];
}
def FlagEnum : InheritableAttr {
- let Spellings = [Clang<"flag_enum">];
+ let Spellings = [Clang<"flag_enum", 1>];
let Subjects = SubjectList<[Enum]>;
let Documentation = [FlagEnumDocs];
}
def EnumExtensibility : InheritableAttr {
- let Spellings = [Clang<"enum_extensibility">];
+ let Spellings = [Clang<"enum_extensibility", 1>];
let Subjects = SubjectList<[Enum]>;
let Args = [EnumArgument<"Extensibility", "Kind",
["closed", "open"], ["Closed", "Open"]>];
}
def TrivialABI : InheritableAttr {
+ // This attribute does not have a C [[]] spelling because it requires the
+ // CPlusPlus language option.
let Spellings = [Clang<"trivial_abi">];
let Subjects = SubjectList<[CXXRecord]>;
let Documentation = [TrivialABIDocs];
}
def NeonPolyVectorType : TypeAttr {
- let Spellings = [Clang<"neon_polyvector_type">];
+ let Spellings = [Clang<"neon_polyvector_type", 1>];
let Args = [IntArgument<"NumElements">];
let Documentation = [Undocumented];
}
def NeonVectorType : TypeAttr {
- let Spellings = [Clang<"neon_vector_type">];
+ let Spellings = [Clang<"neon_vector_type", 1>];
let Args = [IntArgument<"NumElements">];
let Documentation = [Undocumented];
}
}
def DisableTailCalls : InheritableAttr {
- let Spellings = [Clang<"disable_tail_calls">];
+ let Spellings = [Clang<"disable_tail_calls", 1>];
let Subjects = SubjectList<[Function, ObjCMethod]>;
let Documentation = [DisableTailCallsDocs];
}
}
def NoDuplicate : InheritableAttr {
- let Spellings = [Clang<"noduplicate">];
+ let Spellings = [Clang<"noduplicate", 1>];
let Subjects = SubjectList<[Function]>;
let Documentation = [NoDuplicateDocs];
}
def Convergent : InheritableAttr {
- let Spellings = [Clang<"convergent">];
+ let Spellings = [Clang<"convergent", 1>];
let Subjects = SubjectList<[Function]>;
let Documentation = [ConvergentDocs];
}
// pass_object_size(N) indicates that the parameter should have
// __builtin_object_size with Type=N evaluated on the parameter at the callsite.
def PassObjectSize : InheritableParamAttr {
- let Spellings = [Clang<"pass_object_size">];
+ let Spellings = [Clang<"pass_object_size", 1>];
let Args = [IntArgument<"Type">];
let Subjects = SubjectList<[ParmVar]>;
let Documentation = [PassObjectSizeDocs];
}
def NotTailCalled : InheritableAttr {
- let Spellings = [Clang<"not_tail_called">];
+ let Spellings = [Clang<"not_tail_called", 1>];
let Subjects = SubjectList<[Function]>;
let Documentation = [NotTailCalledDocs];
}
}
def OptimizeNone : InheritableAttr {
- let Spellings = [Clang<"optnone">];
+ let Spellings = [Clang<"optnone", 1>];
let Subjects = SubjectList<[Function, ObjCMethod]>;
let Documentation = [OptnoneDocs];
}
def Overloadable : Attr {
- let Spellings = [Clang<"overloadable">];
+ let Spellings = [Clang<"overloadable", 1>];
let Subjects = SubjectList<[Function], ErrorDiag>;
let Documentation = [OverloadableDocs];
}
}
def Ownership : InheritableAttr {
- let Spellings = [Clang<"ownership_holds">, Clang<"ownership_returns">,
- Clang<"ownership_takes">];
- let Accessors = [Accessor<"isHolds", [Clang<"ownership_holds">]>,
- Accessor<"isReturns", [Clang<"ownership_returns">]>,
- Accessor<"isTakes", [Clang<"ownership_takes">]>];
+ let Spellings = [Clang<"ownership_holds", 1>, Clang<"ownership_returns", 1>,
+ Clang<"ownership_takes", 1>];
+ let Accessors = [Accessor<"isHolds", [Clang<"ownership_holds", 1>]>,
+ Accessor<"isReturns", [Clang<"ownership_returns", 1>]>,
+ Accessor<"isTakes", [Clang<"ownership_takes", 1>]>];
let AdditionalMembers = [{
enum OwnershipKind { Holds, Returns, Takes };
OwnershipKind getOwnKind() const {
}
def RequireConstantInit : InheritableAttr {
+ // This attribute does not have a C [[]] spelling because it requires the
+ // CPlusPlus language option.
let Spellings = [Clang<"require_constant_initialization">];
let Subjects = SubjectList<[GlobalVar], ErrorDiag>;
let Documentation = [RequireConstantInitDocs];
}
def SwiftCall : InheritableAttr {
- let Spellings = [Clang<"swiftcall">];
+ let Spellings = [Clang<"swiftcall", 1>];
// let Subjects = SubjectList<[Function]>;
let Documentation = [SwiftCallDocs];
}
def SwiftContext : ParameterABIAttr {
- let Spellings = [Clang<"swift_context">];
+ let Spellings = [Clang<"swift_context", 1>];
let Documentation = [SwiftContextDocs];
}
def SwiftErrorResult : ParameterABIAttr {
- let Spellings = [Clang<"swift_error_result">];
+ let Spellings = [Clang<"swift_error_result", 1>];
let Documentation = [SwiftErrorResultDocs];
}
def SwiftIndirectResult : ParameterABIAttr {
- let Spellings = [Clang<"swift_indirect_result">];
+ let Spellings = [Clang<"swift_indirect_result", 1>];
let Documentation = [SwiftIndirectResultDocs];
}
}
def VectorCall : InheritableAttr {
- let Spellings = [Clang<"vectorcall">, Keyword<"__vectorcall">,
+ let Spellings = [Clang<"vectorcall", 1>, Keyword<"__vectorcall">,
Keyword<"_vectorcall">];
// let Subjects = [Function, ObjCMethod];
let Documentation = [VectorCallDocs];
}
def Pascal : InheritableAttr {
- let Spellings = [Clang<"pascal">, Keyword<"__pascal">, Keyword<"_pascal">];
+ let Spellings = [Clang<"pascal", 1>, Keyword<"__pascal">, Keyword<"_pascal">];
// let Subjects = [Function, ObjCMethod];
let Documentation = [Undocumented];
}
def PreserveMost : InheritableAttr {
- let Spellings = [Clang<"preserve_most">];
+ let Spellings = [Clang<"preserve_most", 1>];
let Documentation = [PreserveMostDocs];
}
def PreserveAll : InheritableAttr {
- let Spellings = [Clang<"preserve_all">];
+ let Spellings = [Clang<"preserve_all", 1>];
let Documentation = [PreserveAllDocs];
}
}
def Unavailable : InheritableAttr {
- let Spellings = [Clang<"unavailable">];
+ let Spellings = [Clang<"unavailable", 1>];
let Args = [StringArgument<"Message", 1>,
EnumArgument<"ImplicitReason", "ImplicitReason",
["", "", "", ""],
def TypeVisibility : InheritableAttr {
let Clone = 0;
- let Spellings = [Clang<"type_visibility">];
+ let Spellings = [Clang<"type_visibility", 1>];
let Args = [EnumArgument<"Visibility", "VisibilityType",
["default", "hidden", "internal", "protected"],
["Default", "Hidden", "Hidden", "Protected"]>];
}
def VecReturn : InheritableAttr {
+ // This attribute does not have a C [[]] spelling because it only appertains
+ // to C++ struct/class/union.
+ // FIXME: should this attribute have a CPlusPlus language option?
let Spellings = [Clang<"vecreturn">];
let Subjects = SubjectList<[CXXRecord], ErrorDiag>;
let Documentation = [Undocumented];
}
def WeakImport : InheritableAttr {
- let Spellings = [Clang<"weak_import">];
+ let Spellings = [Clang<"weak_import", 1>];
let Documentation = [Undocumented];
}
}
def LTOVisibilityPublic : InheritableAttr {
- let Spellings = [Clang<"lto_visibility_public">];
+ let Spellings = [Clang<"lto_visibility_public", 1>];
let Subjects = SubjectList<[Record]>;
let Documentation = [LTOVisibilityDocs];
}
}
def NoSanitize : InheritableAttr {
- let Spellings = [Clang<"no_sanitize">];
+ let Spellings = [Clang<"no_sanitize", 1>];
let Args = [VariadicStringArgument<"Sanitizers">];
let Subjects = SubjectList<[Function, ObjCMethod, GlobalVar], ErrorDiag>;
let Documentation = [NoSanitizeDocs];
let Spellings = [GCC<"no_address_safety_analysis">,
GCC<"no_sanitize_address">,
GCC<"no_sanitize_thread">,
- Clang<"no_sanitize_memory">];
+ Clang<"no_sanitize_memory", 1>];
let Subjects = SubjectList<[Function, GlobalVar], ErrorDiag>;
let Documentation = [NoSanitizeAddressDocs, NoSanitizeThreadDocs,
NoSanitizeMemoryDocs];
}
def NoThreadSafetyAnalysis : InheritableAttr {
- let Spellings = [Clang<"no_thread_safety_analysis">];
+ let Spellings = [Clang<"no_thread_safety_analysis", 1>];
let Subjects = SubjectList<[Function]>;
let Documentation = [Undocumented];
}