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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits