r195274 - Updated the thread safety attribute definitions to have subjects defined. These are based off what SemaDeclAttr.cpp is checking for in terms of diagnostic reporting. No functional change intended.
Aaron Ballman
aaron at aaronballman.com
Wed Nov 20 13:40:13 PST 2013
Author: aaronballman
Date: Wed Nov 20 15:40:13 2013
New Revision: 195274
URL: http://llvm.org/viewvc/llvm-project?rev=195274&view=rev
Log:
Updated the thread safety attribute definitions to have subjects defined. These are based off what SemaDeclAttr.cpp is checking for in terms of diagnostic reporting. No functional change intended.
Modified:
cfe/trunk/include/clang/Basic/Attr.td
Modified: cfe/trunk/include/clang/Basic/Attr.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=195274&r1=195273&r2=195274&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Attr.td (original)
+++ cfe/trunk/include/clang/Basic/Attr.td Wed Nov 20 15:40:13 2013
@@ -841,22 +841,27 @@ def NoSanitizeMemory : InheritableAttr {
def GuardedVar : InheritableAttr {
let Spellings = [GNU<"guarded_var">];
+ let Subjects = [Field, Var];
}
def PtGuardedVar : InheritableAttr {
let Spellings = [GNU<"pt_guarded_var">];
+ let Subjects = [Field, Var];
}
def Lockable : InheritableAttr {
let Spellings = [GNU<"lockable">];
+ let Subjects = [Record];
}
def ScopedLockable : InheritableAttr {
let Spellings = [GNU<"scoped_lockable">];
+ let Subjects = [Record];
}
def NoThreadSafetyAnalysis : InheritableAttr {
let Spellings = [GNU<"no_thread_safety_analysis">];
+ let Subjects = [Function, FunctionTemplate];
}
def GuardedBy : InheritableAttr {
@@ -864,6 +869,7 @@ def GuardedBy : InheritableAttr {
let Args = [ExprArgument<"Arg">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Field, Var];
}
def PtGuardedBy : InheritableAttr {
@@ -871,6 +877,7 @@ def PtGuardedBy : InheritableAttr {
let Args = [ExprArgument<"Arg">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Field, Var];
}
def AcquiredAfter : InheritableAttr {
@@ -878,6 +885,7 @@ def AcquiredAfter : InheritableAttr {
let Args = [VariadicExprArgument<"Args">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Field, Var];
}
def AcquiredBefore : InheritableAttr {
@@ -885,6 +893,7 @@ def AcquiredBefore : InheritableAttr {
let Args = [VariadicExprArgument<"Args">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Field, Var];
}
def ExclusiveLockFunction : InheritableAttr {
@@ -892,6 +901,7 @@ def ExclusiveLockFunction : InheritableA
let Args = [VariadicExprArgument<"Args">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Function, FunctionTemplate];
}
def SharedLockFunction : InheritableAttr {
@@ -899,6 +909,7 @@ def SharedLockFunction : InheritableAttr
let Args = [VariadicExprArgument<"Args">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Function, FunctionTemplate];
}
def AssertExclusiveLock : InheritableAttr {
@@ -906,6 +917,7 @@ def AssertExclusiveLock : InheritableAtt
let Args = [VariadicExprArgument<"Args">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Function, FunctionTemplate];
}
def AssertSharedLock : InheritableAttr {
@@ -913,6 +925,7 @@ def AssertSharedLock : InheritableAttr {
let Args = [VariadicExprArgument<"Args">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Function, FunctionTemplate];
}
// The first argument is an integer or boolean value specifying the return value
@@ -922,6 +935,7 @@ def ExclusiveTrylockFunction : Inheritab
let Args = [ExprArgument<"SuccessValue">, VariadicExprArgument<"Args">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Function, FunctionTemplate];
}
// The first argument is an integer or boolean value specifying the return value
@@ -931,6 +945,7 @@ def SharedTrylockFunction : InheritableA
let Args = [ExprArgument<"SuccessValue">, VariadicExprArgument<"Args">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Function, FunctionTemplate];
}
def UnlockFunction : InheritableAttr {
@@ -938,6 +953,7 @@ def UnlockFunction : InheritableAttr {
let Args = [VariadicExprArgument<"Args">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Function, FunctionTemplate];
}
def LockReturned : InheritableAttr {
@@ -945,6 +961,7 @@ def LockReturned : InheritableAttr {
let Args = [ExprArgument<"Arg">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Function, FunctionTemplate];
}
def LocksExcluded : InheritableAttr {
@@ -952,6 +969,7 @@ def LocksExcluded : InheritableAttr {
let Args = [VariadicExprArgument<"Args">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Function, FunctionTemplate];
}
def ExclusiveLocksRequired : InheritableAttr {
@@ -959,6 +977,7 @@ def ExclusiveLocksRequired : Inheritable
let Args = [VariadicExprArgument<"Args">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Function, FunctionTemplate];
}
def SharedLocksRequired : InheritableAttr {
@@ -966,6 +985,7 @@ def SharedLocksRequired : InheritableAtt
let Args = [VariadicExprArgument<"Args">];
let LateParsed = 1;
let TemplateDependent = 1;
+ let Subjects = [Function, FunctionTemplate];
}
// C/C++ consumed attributes.
More information about the cfe-commits
mailing list