Index: include/clang/Basic/Attr.td =================================================================== --- include/clang/Basic/Attr.td +++ include/clang/Basic/Attr.td @@ -513,7 +513,7 @@ } def AddressSpace : TypeAttr { - let Spellings = [GNU<"address_space">]; + let Spellings = [Clang<"address_space">]; let Args = [IntArgument<"AddressSpace">]; let Documentation = [Undocumented]; } @@ -598,7 +598,7 @@ } def Annotate : InheritableParamAttr { - let Spellings = [GNU<"annotate">]; + let Spellings = [Clang<"annotate">]; let Args = [StringArgument<"Annotation">]; // Ensure that the annotate attribute can be used with // '#pragma clang attribute' even though it has no subject list. @@ -700,7 +700,7 @@ } def Blocks : InheritableAttr { - let Spellings = [GNU<"blocks">]; + let Spellings = [Clang<"blocks">]; let Args = [EnumArgument<"Type", "BlockType", ["byref"], ["ByRef"]>]; let Documentation = [Undocumented]; } @@ -727,7 +727,7 @@ // cf_returns_retained attributes. It is generally applied by // '#pragma clang arc_cf_code_audited' rather than explicitly. def CFAuditedTransfer : InheritableAttr { - let Spellings = [GNU<"cf_audited_transfer">]; + let Spellings = [Clang<"cf_audited_transfer">]; let Subjects = SubjectList<[Function], ErrorDiag>; let Documentation = [Undocumented]; } @@ -736,25 +736,25 @@ // It indicates that the function has unknown or unautomatable // transfer semantics. def CFUnknownTransfer : InheritableAttr { - let Spellings = [GNU<"cf_unknown_transfer">]; + let Spellings = [Clang<"cf_unknown_transfer">]; let Subjects = SubjectList<[Function], ErrorDiag>; let Documentation = [Undocumented]; } def CFReturnsRetained : InheritableAttr { - let Spellings = [GNU<"cf_returns_retained">]; + let Spellings = [Clang<"cf_returns_retained">]; // let Subjects = SubjectList<[ObjCMethod, ObjCProperty, Function]>; let Documentation = [Undocumented]; } def CFReturnsNotRetained : InheritableAttr { - let Spellings = [GNU<"cf_returns_not_retained">]; + let Spellings = [Clang<"cf_returns_not_retained">]; // let Subjects = SubjectList<[ObjCMethod, ObjCProperty, Function]>; let Documentation = [Undocumented]; } def CFConsumed : InheritableParamAttr { - let Spellings = [GNU<"cf_consumed">]; + let Spellings = [Clang<"cf_consumed">]; let Subjects = SubjectList<[ParmVar]>; let Documentation = [Undocumented]; } @@ -875,7 +875,7 @@ } def CXX11NoReturn : InheritableAttr { - let Spellings = [CXX11<"","noreturn", 200809>]; + let Spellings = [CXX11<"", "noreturn", 200809>]; let Subjects = SubjectList<[Function], ErrorDiag>; let Documentation = [CXX11NoReturnDocs]; } @@ -1030,13 +1030,13 @@ } def MinSize : InheritableAttr { - let Spellings = [GNU<"minsize">]; + let Spellings = [Clang<"minsize">]; let Subjects = SubjectList<[Function, ObjCMethod], ErrorDiag>; let Documentation = [Undocumented]; } def FlagEnum : InheritableAttr { - let Spellings = [GNU<"flag_enum">]; + let Spellings = [Clang<"flag_enum">]; let Subjects = SubjectList<[Enum]>; let Documentation = [FlagEnumDocs]; } @@ -1085,7 +1085,7 @@ } def IBAction : InheritableAttr { - let Spellings = [GNU<"ibaction">]; + let Spellings = [Clang<"ibaction">]; let Subjects = SubjectList<[ObjCInstanceMethod]>; // An AST node is created for this attribute, but is not used by other parts // of the compiler. However, this node needs to exist in the AST because @@ -1094,13 +1094,13 @@ } def IBOutlet : InheritableAttr { - let Spellings = [GNU<"iboutlet">]; + let Spellings = [Clang<"iboutlet">]; // let Subjects = [ObjCIvar, ObjCProperty]; let Documentation = [Undocumented]; } def IBOutletCollection : InheritableAttr { - let Spellings = [GNU<"iboutletcollection">]; + let Spellings = [Clang<"iboutletcollection">]; let Args = [TypeArgument<"Interface", 1>]; // let Subjects = [ObjCIvar, ObjCProperty]; let Documentation = [Undocumented]; @@ -1210,13 +1210,13 @@ } def NeonPolyVectorType : TypeAttr { - let Spellings = [GNU<"neon_polyvector_type">]; + let Spellings = [Clang<"neon_polyvector_type">]; let Args = [IntArgument<"NumElements">]; let Documentation = [Undocumented]; } def NeonVectorType : TypeAttr { - let Spellings = [GNU<"neon_vector_type">]; + let Spellings = [Clang<"neon_vector_type">]; let Args = [IntArgument<"NumElements">]; let Documentation = [Undocumented]; } @@ -1299,28 +1299,28 @@ // this should be rejected on non-kernels. def AMDGPUFlatWorkGroupSize : InheritableAttr { - let Spellings = [GNU<"amdgpu_flat_work_group_size">]; + let Spellings = [Clang<"amdgpu_flat_work_group_size">]; let Args = [UnsignedArgument<"Min">, UnsignedArgument<"Max">]; let Documentation = [AMDGPUFlatWorkGroupSizeDocs]; let Subjects = SubjectList<[Function], ErrorDiag, "kernel functions">; } def AMDGPUWavesPerEU : InheritableAttr { - let Spellings = [GNU<"amdgpu_waves_per_eu">]; + let Spellings = [Clang<"amdgpu_waves_per_eu">]; let Args = [UnsignedArgument<"Min">, UnsignedArgument<"Max", 1>]; let Documentation = [AMDGPUWavesPerEUDocs]; let Subjects = SubjectList<[Function], ErrorDiag, "kernel functions">; } def AMDGPUNumSGPR : InheritableAttr { - let Spellings = [GNU<"amdgpu_num_sgpr">]; + let Spellings = [Clang<"amdgpu_num_sgpr">]; let Args = [UnsignedArgument<"NumSGPR">]; let Documentation = [AMDGPUNumSGPRNumVGPRDocs]; let Subjects = SubjectList<[Function], ErrorDiag, "kernel functions">; } def AMDGPUNumVGPR : InheritableAttr { - let Spellings = [GNU<"amdgpu_num_vgpr">]; + let Spellings = [Clang<"amdgpu_num_vgpr">]; let Args = [UnsignedArgument<"NumVGPR">]; let Documentation = [AMDGPUNumSGPRNumVGPRDocs]; let Subjects = SubjectList<[Function], ErrorDiag, "kernel functions">; @@ -1360,7 +1360,7 @@ // 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 = [GNU<"pass_object_size">]; + let Spellings = [Clang<"pass_object_size">]; let Args = [IntArgument<"Type">]; let Subjects = SubjectList<[ParmVar]>; let Documentation = [PassObjectSizeDocs]; @@ -1439,14 +1439,14 @@ } def ObjCBridge : InheritableAttr { - let Spellings = [GNU<"objc_bridge">]; + let Spellings = [Clang<"objc_bridge">]; let Subjects = SubjectList<[Record, TypedefName], ErrorDiag>; let Args = [IdentifierArgument<"BridgedType">]; let Documentation = [Undocumented]; } def ObjCBridgeMutable : InheritableAttr { - let Spellings = [GNU<"objc_bridge_mutable">]; + let Spellings = [Clang<"objc_bridge_mutable">]; let Subjects = SubjectList<[Record], ErrorDiag>; let Args = [IdentifierArgument<"BridgedType">]; let Documentation = [Undocumented]; @@ -1463,43 +1463,43 @@ } def NSReturnsRetained : InheritableAttr { - let Spellings = [GNU<"ns_returns_retained">]; + let Spellings = [Clang<"ns_returns_retained">]; // let Subjects = SubjectList<[ObjCMethod, ObjCProperty, Function]>; let Documentation = [Undocumented]; } def NSReturnsNotRetained : InheritableAttr { - let Spellings = [GNU<"ns_returns_not_retained">]; + let Spellings = [Clang<"ns_returns_not_retained">]; // let Subjects = SubjectList<[ObjCMethod, ObjCProperty, Function]>; let Documentation = [Undocumented]; } def NSReturnsAutoreleased : InheritableAttr { - let Spellings = [GNU<"ns_returns_autoreleased">]; + let Spellings = [Clang<"ns_returns_autoreleased">]; // let Subjects = SubjectList<[ObjCMethod, ObjCProperty, Function]>; let Documentation = [Undocumented]; } def NSConsumesSelf : InheritableAttr { - let Spellings = [GNU<"ns_consumes_self">]; + let Spellings = [Clang<"ns_consumes_self">]; let Subjects = SubjectList<[ObjCMethod]>; let Documentation = [Undocumented]; } def NSConsumed : InheritableParamAttr { - let Spellings = [GNU<"ns_consumed">]; + let Spellings = [Clang<"ns_consumed">]; let Subjects = SubjectList<[ParmVar]>; let Documentation = [Undocumented]; } def ObjCException : InheritableAttr { - let Spellings = [GNU<"objc_exception">]; + let Spellings = [Clang<"objc_exception">]; let Subjects = SubjectList<[ObjCInterface], ErrorDiag>; let Documentation = [Undocumented]; } def ObjCMethodFamily : InheritableAttr { - let Spellings = [GNU<"objc_method_family">]; + let Spellings = [Clang<"objc_method_family">]; let Subjects = SubjectList<[ObjCMethod], ErrorDiag>; let Args = [EnumArgument<"Family", "FamilyKind", ["none", "alloc", "copy", "init", "mutableCopy", "new"], @@ -1509,72 +1509,72 @@ } def ObjCNSObject : InheritableAttr { - let Spellings = [GNU<"NSObject">]; + let Spellings = [Clang<"NSObject">]; let Documentation = [Undocumented]; } def ObjCIndependentClass : InheritableAttr { - let Spellings = [GNU<"objc_independent_class">]; + let Spellings = [Clang<"objc_independent_class">]; let Documentation = [Undocumented]; } def ObjCPreciseLifetime : InheritableAttr { - let Spellings = [GNU<"objc_precise_lifetime">]; + let Spellings = [Clang<"objc_precise_lifetime">]; let Subjects = SubjectList<[Var], ErrorDiag>; let Documentation = [Undocumented]; } def ObjCReturnsInnerPointer : InheritableAttr { - let Spellings = [GNU<"objc_returns_inner_pointer">]; + let Spellings = [Clang<"objc_returns_inner_pointer">]; let Subjects = SubjectList<[ObjCMethod, ObjCProperty], ErrorDiag>; let Documentation = [Undocumented]; } def ObjCRequiresSuper : InheritableAttr { - let Spellings = [GNU<"objc_requires_super">]; + let Spellings = [Clang<"objc_requires_super">]; let Subjects = SubjectList<[ObjCMethod], ErrorDiag>; let Documentation = [ObjCRequiresSuperDocs]; } def ObjCRootClass : InheritableAttr { - let Spellings = [GNU<"objc_root_class">]; + let Spellings = [Clang<"objc_root_class">]; let Subjects = SubjectList<[ObjCInterface], ErrorDiag>; let Documentation = [Undocumented]; } def ObjCSubclassingRestricted : InheritableAttr { - let Spellings = [GNU<"objc_subclassing_restricted">]; + let Spellings = [Clang<"objc_subclassing_restricted">]; let Subjects = SubjectList<[ObjCInterface], ErrorDiag>; let Documentation = [ObjCSubclassingRestrictedDocs]; } def ObjCExplicitProtocolImpl : InheritableAttr { - let Spellings = [GNU<"objc_protocol_requires_explicit_implementation">]; + let Spellings = [Clang<"objc_protocol_requires_explicit_implementation">]; let Subjects = SubjectList<[ObjCProtocol], ErrorDiag>; let Documentation = [Undocumented]; } def ObjCDesignatedInitializer : Attr { - let Spellings = [GNU<"objc_designated_initializer">]; + let Spellings = [Clang<"objc_designated_initializer">]; let Subjects = SubjectList<[ObjCInterfaceDeclInitMethod], ErrorDiag>; let Documentation = [Undocumented]; } def ObjCRuntimeName : Attr { - let Spellings = [GNU<"objc_runtime_name">]; + let Spellings = [Clang<"objc_runtime_name">]; let Subjects = SubjectList<[ObjCInterface, ObjCProtocol], ErrorDiag>; let Args = [StringArgument<"MetadataName">]; let Documentation = [ObjCRuntimeNameDocs]; } def ObjCRuntimeVisible : Attr { - let Spellings = [GNU<"objc_runtime_visible">]; + let Spellings = [Clang<"objc_runtime_visible">]; let Subjects = SubjectList<[ObjCInterface], ErrorDiag>; let Documentation = [ObjCRuntimeVisibleDocs]; } def ObjCBoxable : Attr { - let Spellings = [GNU<"objc_boxable">]; + let Spellings = [Clang<"objc_boxable">]; let Subjects = SubjectList<[Record], ErrorDiag>; let Documentation = [ObjCBoxableDocs]; } @@ -1586,7 +1586,7 @@ } def Overloadable : Attr { - let Spellings = [GNU<"overloadable">]; + let Spellings = [Clang<"overloadable">]; let Subjects = SubjectList<[Function], ErrorDiag>; let Documentation = [OverloadableDocs]; } @@ -1598,11 +1598,11 @@ } def Ownership : InheritableAttr { - let Spellings = [GNU<"ownership_holds">, GNU<"ownership_returns">, - GNU<"ownership_takes">]; - let Accessors = [Accessor<"isHolds", [GNU<"ownership_holds">]>, - Accessor<"isReturns", [GNU<"ownership_returns">]>, - Accessor<"isTakes", [GNU<"ownership_takes">]>]; + 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 AdditionalMembers = [{ enum OwnershipKind { Holds, Returns, Takes }; OwnershipKind getOwnKind() const { @@ -1623,7 +1623,7 @@ } def IntelOclBicc : InheritableAttr { - let Spellings = [GNU<"intel_ocl_bicc">]; + let Spellings = [Clang<"intel_ocl_bicc">]; // let Subjects = [Function, ObjCMethod]; let Documentation = [Undocumented]; } @@ -1734,23 +1734,23 @@ } def SwiftCall : InheritableAttr { - let Spellings = [GNU<"swiftcall">]; + let Spellings = [Clang<"swiftcall">]; // let Subjects = SubjectList<[Function]>; let Documentation = [SwiftCallDocs]; } def SwiftContext : ParameterABIAttr { - let Spellings = [GNU<"swift_context">]; + let Spellings = [Clang<"swift_context">]; let Documentation = [SwiftContextDocs]; } def SwiftErrorResult : ParameterABIAttr { - let Spellings = [GNU<"swift_error_result">]; + let Spellings = [Clang<"swift_error_result">]; let Documentation = [SwiftErrorResultDocs]; } def SwiftIndirectResult : ParameterABIAttr { - let Spellings = [GNU<"swift_indirect_result">]; + let Spellings = [Clang<"swift_indirect_result">]; let Documentation = [SwiftIndirectResultDocs]; } @@ -1774,25 +1774,25 @@ } def VectorCall : InheritableAttr { - let Spellings = [GNU<"vectorcall">, Keyword<"__vectorcall">, + let Spellings = [Clang<"vectorcall">, Keyword<"__vectorcall">, Keyword<"_vectorcall">]; // let Subjects = [Function, ObjCMethod]; let Documentation = [VectorCallDocs]; } def Pascal : InheritableAttr { - let Spellings = [GNU<"pascal">, Keyword<"__pascal">, Keyword<"_pascal">]; + let Spellings = [Clang<"pascal">, Keyword<"__pascal">, Keyword<"_pascal">]; // let Subjects = [Function, ObjCMethod]; let Documentation = [Undocumented]; } def PreserveMost : InheritableAttr { - let Spellings = [GNU<"preserve_most">]; + let Spellings = [Clang<"preserve_most">]; let Documentation = [PreserveMostDocs]; } def PreserveAll : InheritableAttr { - let Spellings = [GNU<"preserve_all">]; + let Spellings = [Clang<"preserve_all">]; let Documentation = [PreserveAllDocs]; } @@ -1853,7 +1853,7 @@ } def Unavailable : InheritableAttr { - let Spellings = [GNU<"unavailable">]; + let Spellings = [Clang<"unavailable">]; let Args = [StringArgument<"Message", 1>, EnumArgument<"ImplicitReason", "ImplicitReason", ["", "", "", ""], @@ -1887,26 +1887,26 @@ } def ArcWeakrefUnavailable : InheritableAttr { - let Spellings = [GNU<"objc_arc_weak_reference_unavailable">]; + let Spellings = [Clang<"objc_arc_weak_reference_unavailable">]; let Subjects = SubjectList<[ObjCInterface], ErrorDiag>; let Documentation = [Undocumented]; } def ObjCGC : TypeAttr { - let Spellings = [GNU<"objc_gc">]; + let Spellings = [Clang<"objc_gc">]; let Args = [IdentifierArgument<"Kind">]; let Documentation = [Undocumented]; } def ObjCOwnership : InheritableAttr { - let Spellings = [GNU<"objc_ownership">]; + let Spellings = [Clang<"objc_ownership">]; let Args = [IdentifierArgument<"Kind">]; let ASTNode = 0; let Documentation = [Undocumented]; } def ObjCRequiresPropertyDefs : InheritableAttr { - let Spellings = [GNU<"objc_requires_property_definitions">]; + let Spellings = [Clang<"objc_requires_property_definitions">]; let Subjects = SubjectList<[ObjCInterface], ErrorDiag>; let Documentation = [Undocumented]; } @@ -1968,7 +1968,7 @@ } def VecReturn : InheritableAttr { - let Spellings = [GNU<"vecreturn">]; + let Spellings = [Clang<"vecreturn">]; let Subjects = SubjectList<[CXXRecord], ErrorDiag>; let Documentation = [Undocumented]; } @@ -1994,7 +1994,7 @@ } def WeakImport : InheritableAttr { - let Spellings = [GNU<"weak_import">]; + let Spellings = [Clang<"weak_import">]; let Documentation = [Undocumented]; } @@ -2007,7 +2007,7 @@ } def LTOVisibilityPublic : InheritableAttr { - let Spellings = [CXX11<"clang", "lto_visibility_public">]; + let Spellings = [Clang<"lto_visibility_public">]; let Subjects = SubjectList<[Record]>; let Documentation = [LTOVisibilityDocs]; } @@ -2060,7 +2060,7 @@ let Spellings = [GCC<"no_address_safety_analysis">, GCC<"no_sanitize_address">, GCC<"no_sanitize_thread">, - GNU<"no_sanitize_memory">]; + Clang<"no_sanitize_memory">]; let Subjects = SubjectList<[Function, GlobalVar], ErrorDiag>; let Documentation = [NoSanitizeAddressDocs, NoSanitizeThreadDocs, NoSanitizeMemoryDocs]; @@ -2070,13 +2070,13 @@ // C/C++ Thread safety attributes (e.g. for deadlock, data race checking) def GuardedVar : InheritableAttr { - let Spellings = [GNU<"guarded_var">]; + let Spellings = [Clang<"guarded_var">]; let Subjects = SubjectList<[Field, SharedVar]>; let Documentation = [Undocumented]; } def PtGuardedVar : InheritableAttr { - let Spellings = [GNU<"pt_guarded_var">]; + let Spellings = [Clang<"pt_guarded_var">]; let Subjects = SubjectList<[Field, SharedVar]>; let Documentation = [Undocumented]; } @@ -2089,7 +2089,7 @@ } def ScopedLockable : InheritableAttr { - let Spellings = [GNU<"scoped_lockable">]; + let Spellings = [Clang<"scoped_lockable">]; let Subjects = SubjectList<[Record]>; let Documentation = [Undocumented]; } @@ -2157,7 +2157,7 @@ let Spellings = [Clang<"release_capability">, Clang<"release_shared_capability">, Clang<"release_generic_capability">, - GNU<"unlock_function">]; + Clang<"unlock_function">]; let Subjects = SubjectList<[Function]>; let LateParsed = 1; let TemplateDependent = 1; @@ -2168,15 +2168,15 @@ [Clang<"release_shared_capability">]>, Accessor<"isGeneric", [Clang<"release_generic_capability">, - GNU<"unlock_function">]>]; + Clang<"unlock_function">]>]; let Documentation = [ReleaseCapabilityDocs]; } def RequiresCapability : InheritableAttr { let Spellings = [Clang<"requires_capability">, - GNU<"exclusive_locks_required">, + Clang<"exclusive_locks_required">, Clang<"requires_shared_capability">, - GNU<"shared_locks_required">]; + Clang<"shared_locks_required">]; let Args = [VariadicExprArgument<"Args">]; let LateParsed = 1; let TemplateDependent = 1; @@ -2184,12 +2184,12 @@ let DuplicatesAllowedWhileMerging = 1; let Subjects = SubjectList<[Function]>; let Accessors = [Accessor<"isShared", [Clang<"requires_shared_capability">, - GNU<"shared_locks_required">]>]; + Clang<"shared_locks_required">]>]; let Documentation = [Undocumented]; } def NoThreadSafetyAnalysis : InheritableAttr { - let Spellings = [GNU<"no_thread_safety_analysis">]; + let Spellings = [Clang<"no_thread_safety_analysis">]; let Subjects = SubjectList<[Function]>; let Documentation = [Undocumented]; } @@ -2310,7 +2310,7 @@ // C/C++ consumed attributes. def Consumable : InheritableAttr { - let Spellings = [GNU<"consumable">]; + let Spellings = [Clang<"consumable">]; let Subjects = SubjectList<[CXXRecord]>; let Args = [EnumArgument<"DefaultState", "ConsumedState", ["unknown", "consumed", "unconsumed"], @@ -2319,19 +2319,19 @@ } def ConsumableAutoCast : InheritableAttr { - let Spellings = [GNU<"consumable_auto_cast_state">]; + let Spellings = [Clang<"consumable_auto_cast_state">]; let Subjects = SubjectList<[CXXRecord]>; let Documentation = [Undocumented]; } def ConsumableSetOnRead : InheritableAttr { - let Spellings = [GNU<"consumable_set_state_on_read">]; + let Spellings = [Clang<"consumable_set_state_on_read">]; let Subjects = SubjectList<[CXXRecord]>; let Documentation = [Undocumented]; } def CallableWhen : InheritableAttr { - let Spellings = [GNU<"callable_when">]; + let Spellings = [Clang<"callable_when">]; let Subjects = SubjectList<[CXXMethod]>; let Args = [VariadicEnumArgument<"CallableStates", "ConsumedState", ["unknown", "consumed", "unconsumed"], @@ -2340,7 +2340,7 @@ } def ParamTypestate : InheritableAttr { - let Spellings = [GNU<"param_typestate">]; + let Spellings = [Clang<"param_typestate">]; let Subjects = SubjectList<[ParmVar]>; let Args = [EnumArgument<"ParamState", "ConsumedState", ["unknown", "consumed", "unconsumed"], @@ -2349,7 +2349,7 @@ } def ReturnTypestate : InheritableAttr { - let Spellings = [GNU<"return_typestate">]; + let Spellings = [Clang<"return_typestate">]; let Subjects = SubjectList<[Function, ParmVar]>; let Args = [EnumArgument<"State", "ConsumedState", ["unknown", "consumed", "unconsumed"], @@ -2358,7 +2358,7 @@ } def SetTypestate : InheritableAttr { - let Spellings = [GNU<"set_typestate">]; + let Spellings = [Clang<"set_typestate">]; let Subjects = SubjectList<[CXXMethod]>; let Args = [EnumArgument<"NewState", "ConsumedState", ["unknown", "consumed", "unconsumed"], @@ -2367,7 +2367,7 @@ } def TestTypestate : InheritableAttr { - let Spellings = [GNU<"test_typestate">]; + let Spellings = [Clang<"test_typestate">]; let Subjects = SubjectList<[CXXMethod]>; let Args = [EnumArgument<"TestState", "ConsumedState", ["consumed", "unconsumed"],