[PATCH] D64287: [analyzer] Track the right hand side of the last store regardless of its value

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 9 12:49:17 PDT 2019


NoQ added a comment.

Whoa, the new notes are amazing. Looks like you've found a pretty bad omission.



================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1436-1437
-    }
-    ReturnVisitor::addVisitorIfNecessary(StoreSite, InitE->IgnoreParenCasts(),
-                                         BR, EnableNullFPSuppression);
   }
----------------
You're removing this visitor, does it cause any removal of notes?


================
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1989-1991
+    }
+    else if (const auto *AR = L->getRegionAs<AllocaRegion>())
+      CanDereference = false;
----------------
Fair enough. Did we already have a test case for this? I wonder if function pointers might also cause problems here.

Ugh, this code is so underdebugged.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64287





More information about the cfe-commits mailing list