NoQ added a comment.

I'm really glad it actually works!

> We are interested in deprecating the use of function based ownership 
> attributes in favor of using function parameter annotations. This change does 
> not currently provide deprecation warnings.

Do we also need to convert `ownership_holds` to parameter attribute? I think it 
doesn't make sense to deprecate until we convert all of them.

> This change does not fully test static analysis of ownership parameters 
> (malloc-annotations.c).

I think it makes sense to simply copy that file and replace function attributes 
with parameter attributes and see if it still passes.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1405
 
-void MallocChecker::checkOwnershipAttr(const CallEvent &Call,
-                                       CheckerContext &C) const {
+static const FunctionDecl *functionDeclForCall(const CallEvent &Call,
+                                               CheckerContext &C) {
----------------
`Call.getDecl()` is intended to be the ultimate source of truth on this subject.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113530/new/

https://reviews.llvm.org/D113530

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to