aaron.ballman created this revision. Herald added subscribers: kristof.beyls, Anastasia, mehdi_amini, aemerson.
Based on discussions at the WG21 meeting in Albuquerque and follow-up email discussions, I believe the correct approach to exposing attributes from Clang is to provide them with GNU-style __attribute__ spellings as well as C++-style [[]] spellings in the clang vendor namespace, when appropriate. If the attribute was originally provided by a different vendor, and Clang intends to be compatible with those semantics, then the attribute should only be provided with the spellings supported by the original vendor. Otherwise, any attributes provided only by Clang should be exposed as both a GNU-style and C++-style attribute as appropriate for the semantics of that attribute. To that end, this patch adds a C++ spelling in the clang vendor namespace to a number of attributes. Similarly, it adds a GNU spelling to the `lto_visibility_public` attribute (which was the only one with a C++ spelling but not a GNU spelling). Finally, it leaves the following attributes with only a GNU spelling, based on the given rationale: align_value -- originally provided by Intel with only a GNU spelling constant, cudart_builtin, device, device_builtin_surface_type, device_builtin_texture_type, host, launch_bounds, shared, nv_weak -- attributes specified by CUDA with only a GNU spelling (several are also ignored attributes) opencl_unroll_hint, intel_reqd_sub_group_size, nosvm, ext_vector_type, reqd_work_group_size, work_group_size_hint, vec_type_hint -- attributes specified by OpenCL with only a GNU spelling kernel -- specified by RenderScript carries_dependency -- supported as a standards-based attribute, shouldn't be in a vendor namespace enable_if, diagnose_if, guarded_by, pt_guarded_by, acquired_after, acquired_before, assert_exclusive_lock, assert_shared_lock, exclusive_trylock_function, shared_trylock_function, lock_returned, locks_excluded -- not easily used with the C++ spelling because the attribute requires naming function parameters (these might be good candidates to explore changing into type attributes in the future). bounded -- currently ignored *Please double-check my understanding of these attribute spellings.* It is possible that I've misunderstood attributes as being specified by other sources when in fact they are Clang extensions, or that something is listed as a Clang extension but is actually a compatibility attribute. If my understanding is correct, I'll add the rationales to Attr.td as comments alongside the attribute spelling so that we don't lose that information. Because this is a mechanical change that only introduces new spellings, there are no proposed test cases for the patch. https://reviews.llvm.org/D40625 Files: include/clang/Basic/Attr.td
Index: include/clang/Basic/Attr.td =================================================================== --- include/clang/Basic/Attr.td +++ include/clang/Basic/Attr.td @@ -518,7 +518,7 @@ } def AddressSpace : TypeAttr { - let Spellings = [GNU<"address_space">]; + let Spellings = [Clang<"address_space">]; let Args = [IntArgument<"AddressSpace">]; let Documentation = [Undocumented]; } @@ -599,12 +599,12 @@ } def AnalyzerNoReturn : InheritableAttr { - let Spellings = [GNU<"analyzer_noreturn">]; + let Spellings = [Clang<"analyzer_noreturn">]; let Documentation = [Undocumented]; } 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. @@ -646,7 +646,7 @@ } def Availability : InheritableAttr { - let Spellings = [GNU<"availability">]; + let Spellings = [Clang<"availability">]; let Args = [IdentifierArgument<"platform">, VersionArgument<"introduced">, VersionArgument<"deprecated">, VersionArgument<"obsoleted">, BoolArgument<"unavailable">, StringArgument<"message">, @@ -706,7 +706,7 @@ } def Blocks : InheritableAttr { - let Spellings = [GNU<"blocks">]; + let Spellings = [Clang<"blocks">]; let Args = [EnumArgument<"Type", "BlockType", ["byref"], ["ByRef"]>]; let Documentation = [Undocumented]; } @@ -733,34 +733,34 @@ // 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]; } // cf_unknown_transfer is an explicit opt-out of cf_audited_transfer. // 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]; } @@ -881,7 +881,7 @@ } def CXX11NoReturn : InheritableAttr { - let Spellings = [CXX11<"","noreturn", 200809>]; + let Spellings = [CXX11<"", "noreturn", 200809>]; let Subjects = SubjectList<[Function], ErrorDiag>; let Documentation = [CXX11NoReturnDocs]; } @@ -1036,13 +1036,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]; } @@ -1091,22 +1091,22 @@ } 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 // external tools rely on it. let Documentation = [Undocumented]; } 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]; @@ -1216,13 +1216,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]; } @@ -1305,28 +1305,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">; @@ -1366,7 +1366,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]; @@ -1445,21 +1445,21 @@ } 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]; } def ObjCBridgeRelated : InheritableAttr { - let Spellings = [GNU<"objc_bridge_related">]; + let Spellings = [Clang<"objc_bridge_related">]; let Subjects = SubjectList<[Record], ErrorDiag>; let Args = [IdentifierArgument<"RelatedClass">, IdentifierArgument<"ClassMethod", 1>, @@ -1469,43 +1469,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"], @@ -1515,72 +1515,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]; } @@ -1592,7 +1592,7 @@ } def Overloadable : Attr { - let Spellings = [GNU<"overloadable">]; + let Spellings = [Clang<"overloadable">]; let Subjects = SubjectList<[Function], ErrorDiag>; let Documentation = [OverloadableDocs]; } @@ -1604,11 +1604,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 { @@ -1629,7 +1629,7 @@ } def IntelOclBicc : InheritableAttr { - let Spellings = [GNU<"intel_ocl_bicc">]; + let Spellings = [Clang<"intel_ocl_bicc">]; // let Subjects = [Function, ObjCMethod]; let Documentation = [Undocumented]; } @@ -1740,23 +1740,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]; } @@ -1780,25 +1780,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]; } @@ -1859,7 +1859,7 @@ } def Unavailable : InheritableAttr { - let Spellings = [GNU<"unavailable">]; + let Spellings = [Clang<"unavailable">]; let Args = [StringArgument<"Message", 1>, EnumArgument<"ImplicitReason", "ImplicitReason", ["", "", "", ""], @@ -1893,26 +1893,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]; } @@ -1974,7 +1974,7 @@ } def VecReturn : InheritableAttr { - let Spellings = [GNU<"vecreturn">]; + let Spellings = [Clang<"vecreturn">]; let Subjects = SubjectList<[CXXRecord], ErrorDiag>; let Documentation = [Undocumented]; } @@ -2000,7 +2000,7 @@ } def WeakImport : InheritableAttr { - let Spellings = [GNU<"weak_import">]; + let Spellings = [Clang<"weak_import">]; let Documentation = [Undocumented]; } @@ -2013,7 +2013,7 @@ } def LTOVisibilityPublic : InheritableAttr { - let Spellings = [CXX11<"clang", "lto_visibility_public">]; + let Spellings = [Clang<"lto_visibility_public">]; let Subjects = SubjectList<[Record]>; let Documentation = [LTOVisibilityDocs]; } @@ -2066,7 +2066,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]; @@ -2076,13 +2076,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]; } @@ -2095,7 +2095,7 @@ } def ScopedLockable : InheritableAttr { - let Spellings = [GNU<"scoped_lockable">]; + let Spellings = [Clang<"scoped_lockable">]; let Subjects = SubjectList<[Record]>; let Documentation = [Undocumented]; } @@ -2163,7 +2163,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; @@ -2174,28 +2174,28 @@ [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; let ParseArgumentsAsUnevaluated = 1; 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]; } @@ -2316,64 +2316,64 @@ // 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"], ["Unknown", "Consumed", "Unconsumed"]>]; let Documentation = [ConsumableDocs]; } 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"], ["Unknown", "Consumed", "Unconsumed"]>]; let Documentation = [CallableWhenDocs]; } 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"], ["Unknown", "Consumed", "Unconsumed"]>]; let Documentation = [ParamTypestateDocs]; } 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"], ["Unknown", "Consumed", "Unconsumed"]>]; let Documentation = [ReturnTypestateDocs]; } 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"], ["Unknown", "Consumed", "Unconsumed"]>]; let Documentation = [SetTypestateDocs]; } def TestTypestate : InheritableAttr { - let Spellings = [GNU<"test_typestate">]; + let Spellings = [Clang<"test_typestate">]; let Subjects = SubjectList<[CXXMethod]>; let Args = [EnumArgument<"TestState", "ConsumedState", ["consumed", "unconsumed"], @@ -2384,8 +2384,8 @@ // Type safety attributes for `void *' pointers and type tags. def ArgumentWithTypeTag : InheritableAttr { - let Spellings = [GNU<"argument_with_type_tag">, - GNU<"pointer_with_type_tag">]; + let Spellings = [Clang<"argument_with_type_tag">, + Clang<"pointer_with_type_tag">]; let Args = [IdentifierArgument<"ArgumentKind">, UnsignedArgument<"ArgumentIdx">, UnsignedArgument<"TypeTagIdx">, @@ -2395,7 +2395,7 @@ } def TypeTagForDatatype : InheritableAttr { - let Spellings = [GNU<"type_tag_for_datatype">]; + let Spellings = [Clang<"type_tag_for_datatype">]; let Args = [IdentifierArgument<"ArgumentKind">, TypeArgument<"MatchingCType">, BoolArgument<"LayoutCompatible">,
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits