================
@@ -718,6 +718,91 @@ class NoStateChangeFuncVisitor : public BugReporterVisitor 
{
                                    PathSensitiveBugReport &R) final;
 };
 
+/// Put a diagnostic on return statement of all inlined functions
+/// for which  the region of interest \p RegionOfInterest was passed into,
+/// but not written inside, and it has caused an undefined read or a null
+/// pointer dereference outside.
+class NoStoreFuncVisitor final : public NoStateChangeFuncVisitor {
+  const SubRegion *RegionOfInterest;
+  MemRegionManager &MmrMgr;
+  const SourceManager &SM;
+  const PrintingPolicy &PP;
+
+  /// Recursion limit for dereferencing fields when looking for the
+  /// region of interest.
+  /// The limit of two indicates that we will dereference fields only once.
+  static const unsigned DEREFERENCE_LIMIT = 2;
----------------
NagyDonat wrote:

Consider replacing this with `MAX_DEREFERENCE_COUNT = 1` which would be mostly 
self-documenting. (However, the current name is also OK if you prefer it.)

EDIT: Now I see that this is not new code, just moved from elsewhere. Feel free 
to ignore this if you're not interested.

https://github.com/llvm/llvm-project/pull/106982
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to