[PATCH] D64232: [analyzer] Prune calls to functions with linear CFGs that return a non-zero constrained value

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 25 07:15:23 PDT 2019


Szelethus updated this revision to Diff 211744.
Szelethus added a comment.

- Be even more strict on the rule: mark the note as prunable even if the note message says `.*(loaded from '<varname>')`. This is okay, because `ReturnVisitor` will track the return value anyways, and if at least a single non-prunable note is added to the function, it won't be pruned (see the test case in the namespace `important_returning_pointer_loaded_from`).
- Add test cases for when the return value is function-local (`unimportant_returning_pointer_loaded_from`), and when it's the parameter (`unimportant_returning_pointer_loaded_from_through_cast`, creduced and then manually reduced from an ASTImporter.cpp <http://cc.elte.hu:15001/GSoC2019-July-5/#is-unique=on&run=LLVM%2FClang%20AFTER%20condition%20tracking%20WITH%20improved%20moderation&review-status=Confirmed&review-status=False%20positive&review-status=Intentional&detection-status=New&detection-status=Reopened&detection-status=Unresolved&tab=LLVM%2FClang%20AFTER%20condition%20tracking%20WITH%20improved%20moderation&reportHash=416bca1a5e2adf7b25a7493e440957e0&report=7566&subtab=416bca1a5e2adf7b25a7493e440957e0> report).


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

https://reviews.llvm.org/D64232

Files:
  clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
  clang/test/Analysis/diagnostics/find_last_store.c
  clang/test/Analysis/track-control-dependency-conditions.cpp
  clang/test/Analysis/uninit-vals.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64232.211744.patch
Type: text/x-patch
Size: 13599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190725/e8af117b/attachment-0001.bin>


More information about the cfe-commits mailing list