martong added inline comments.

================
Comment at: 
clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:2040
+
+    if (ConstStructTimevalPtrTy && StructTimespecPtrTy)
+      // int nanosleep(const struct timespec *rqtp, struct timespec *rmtp);
----------------
balazske wrote:
> Should be `ConstStructTimespecPtrTy`.
Thanks!


================
Comment at: 
clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:2092
+              .ArgConstraint(NotNull(ArgNo(0)))
+              .ArgConstraint(NotNull(ArgNo(1))));
+
----------------
balazske wrote:
> Is it possible to check for the size of the passed buffer? The man page says 
> that `buf` should have room for 26 bytes (for `ctime_r` too).
Yes, absolutely, this is a very good observation. I extended the BufferSize 
constraint to handle concrete values as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84248

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to