[clang] [clang][analyzer] Fix StreamChecker `ftell` and `fgetpos` at indeterminate file position. (PR #84191)

via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 7 01:13:33 PST 2024


================
@@ -880,6 +883,24 @@ void StreamChecker::preReadWrite(const FnDescription *Desc,
   }
 }
 
+void StreamChecker::preWrite(const FnDescription *Desc, const CallEvent &Call,
----------------
NagyDonat wrote:

I agree that `std::bind` is hard to follow, and dedicated handlers dispatching to common implementations is a better model.

The "Copy-pasting their implementation while specializing it" could be even better if the common parts are lifted out into helper functions; but I strongly suggest that we should avoid code duplication.

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


More information about the cfe-commits mailing list