NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!

This patch seems obvious but please upload with context next time 
(https://llvm.org/docs/Phabricator.html#phabricator-request-review-web).



================
Comment at: clang/lib/StaticAnalyzer/Checkers/ReturnPointerRangeChecker.cpp:48
+          dyn_cast_or_null<CallExpr>(C.getStackFrame()->getCallSite());
+      CE && CE->getBuiltinCallee() != 0)
+    return;
----------------
I suspect that you might run into more similar problems with functions coming 
from "body farms". A direct check like
```lang=c++
RetE->getBeginLoc().isValid()
```
might be more reliable.

You might need to check the entire range though. We probably need a unified 
solution for such checks, because many checkers end up implementing them.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138713

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

Reply via email to