[PATCH] D70469: [attributes] [analyzer] Add handle related attributes
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 20 10:49:01 PST 2019
aaron.ballman added a comment.
This is also missing tests for all the Sema handling (that the attributes only appertain to the specified subjects, accept no arguments, etc).
================
Comment at: clang/include/clang/Basic/Attr.td:3445
+ let Spellings = [Clang<"acquire_handle">];
+ let Subjects = SubjectList<[Function, ParmVar], ErrorDiag>;
+ let Documentation = [AcquireHandleDocs];
----------------
What about function-like interfaces such as lambdas, blocks, or other callable objects that are not a `FunctionDecl`?
================
Comment at: clang/include/clang/Basic/Attr.td:3450
+def UseHandle : InheritableParamAttr {
+ let Spellings = [Clang<"use_handle">];
+ let Documentation = [UseHandleDocs];
----------------
Should this have a subject limiting it to parameters?
================
Comment at: clang/include/clang/Basic/Attr.td:3455
+def ReleaseHandle : InheritableParamAttr {
+ let Spellings = [Clang<"release_handle">];
+ let Documentation = [ReleaseHandleDocs];
----------------
Should this have a subject limiting it to parameters?
================
Comment at: clang/include/clang/Basic/AttrDocs.td:4474
+ let Content = [{
+If this annotation is on a function it is assumed to return a new handle.
+In case this annotation is on an output parameter, the function is assumed
----------------
What is a "handle"? I think some introduction docs are needed.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70469/new/
https://reviews.llvm.org/D70469
More information about the cfe-commits
mailing list