diff options
Diffstat (limited to 'include/clang/Basic/Attr.td')
| -rw-r--r-- | include/clang/Basic/Attr.td | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/include/clang/Basic/Attr.td b/include/clang/Basic/Attr.td index 0bbe52bf5f36..fea8e129d7da 100644 --- a/include/clang/Basic/Attr.td +++ b/include/clang/Basic/Attr.td @@ -141,6 +141,13 @@ def HasFunctionProto : SubsetSubject<DeclBase, isa<BlockDecl>(S)}], "non-K&R-style functions">; +// A subject that matches the implicit object parameter of a non-static member +// function. Accepted as a function type attribute on the type of such a +// member function. +// FIXME: This does not actually ever match currently. +def ImplicitObjectParameter : SubsetSubject<Function, [{false}], + "implicit object parameters">; + // A single argument to an attribute class Argument<string name, bit optional, bit fake = 0> { string Name = name; @@ -456,7 +463,7 @@ class Attr { // Set to true if all of the attribute's arguments should be parsed in an // unevaluated context. bit ParseArgumentsAsUnevaluated = 0; - // Set to true if this attribute meaningful when applied to or inherited + // Set to true if this attribute meaningful when applied to or inherited // in a class template definition. bit MeaningfulToClassTemplateDefinition = 0; // Set to true if this attribute can be used with '#pragma clang attribute'. @@ -583,7 +590,7 @@ def AlignValue : Attr { // the future (and a corresponding C++ attribute), but this can be done // later once we decide if we also want them to have slightly-different // semantics than Intel's align_value. - // + // // Does not get a [[]] spelling because the attribute is not exposed as such // by Intel. GNU<"align_value"> @@ -1211,6 +1218,13 @@ def LayoutVersion : InheritableAttr, TargetSpecificAttr<TargetMicrosoftCXXABI> { let Documentation = [LayoutVersionDocs]; } +def LifetimeBound : InheritableAttr { + let Spellings = [Clang<"lifetimebound", 0>]; + let Subjects = SubjectList<[ParmVar, ImplicitObjectParameter], ErrorDiag>; + let Documentation = [LifetimeBoundDocs]; + let LangOpts = [CPlusPlus]; +} + def TrivialABI : InheritableAttr { // This attribute does not have a C [[]] spelling because it requires the // CPlusPlus language option. @@ -1703,7 +1717,7 @@ def Overloadable : Attr { let Documentation = [OverloadableDocs]; } -def Override : InheritableAttr { +def Override : InheritableAttr { let Spellings = [Keyword<"override">]; let SemaHandler = 0; let Documentation = [Undocumented]; @@ -1782,7 +1796,7 @@ def RequireConstantInit : InheritableAttr { def WorkGroupSizeHint : InheritableAttr { // Does not have a [[]] spelling because it is an OpenCL-related attribute. let Spellings = [GNU<"work_group_size_hint">]; - let Args = [UnsignedArgument<"XDim">, + let Args = [UnsignedArgument<"XDim">, UnsignedArgument<"YDim">, UnsignedArgument<"ZDim">]; let Subjects = SubjectList<[Function], ErrorDiag>; |
