[clang] nolock/noalloc attributes (PR #84983)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 12 17:22:06 PDT 2024
================
@@ -1402,6 +1402,29 @@ def CXX11NoReturn : InheritableAttr {
let Documentation = [CXX11NoReturnDocs];
}
+def NoLock : DeclOrTypeAttr {
+ let Spellings = [CXX11<"clang", "nolock">,
+ C23<"clang", "nolock">,
+ GNU<"clang_nolock">];
+
+ // Subjects - not needed?
+ //let Subjects = SubjectList<[FunctionLike, Block, TypedefName], ErrorDiag>;
----------------
Sirraide wrote:
I’m pretty sure `AnnotateType` is a rather unusual attribute.
> that type attributes have some built-in defense.
Hmm, you’re right, my bad, it’s a `DeclOrTypeAttr`, and a lot of those don’t have a `Subjects` list, so in that case if it works without one, then that’s fine I’d say. And yes, tests for appertainment are a good idea.
https://github.com/llvm/llvm-project/pull/84983
More information about the cfe-commits
mailing list