[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

Balázs Kéri via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 8 06:23:19 PST 2024


================
@@ -510,6 +517,14 @@ class StreamChecker : public Checker<check::PreCall, eval::Call,
   ProgramStateRef ensureFseekWhenceCorrect(SVal WhenceVal, CheckerContext &C,
                                            ProgramStateRef State) const;
 
+  ProgramStateRef ensurePtrNotNull(SVal PtrVal, const Expr *PtrExpr,
+                                   CheckerContext &C, ProgramStateRef State,
+                                   const StringRef PtrDescr) const;
+  ProgramStateRef
+  ensureSizeZeroIfLineNull(SVal LinePtrPtrSVal, SVal SizePtrSVal,
----------------
balazske wrote:

Name of this function is not accurate, this is a special function used only for `getdelim` and this is better to be included in the name (like at `ensureFseekWhenceCorrect`).

https://github.com/llvm/llvm-project/pull/83027


More information about the cfe-commits mailing list