[all-commits] [llvm/llvm-project] a62441: [clang][analyzer][NFC] UnixAPIMisuseChecker inheri...

Alejandro Álvarez Ayllón via All-commits all-commits at lists.llvm.org
Fri Mar 22 03:52:41 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a62441d4bb6bd0cd8eccab8c5692340c5a2c60bb
      https://github.com/llvm/llvm-project/commit/a62441d4bb6bd0cd8eccab8c5692340c5a2c60bb
  Author: Alejandro Álvarez Ayllón <alejandro.alvarez at sonarsource.com>
  Date:   2024-03-22 (Fri, 22 Mar 2024)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp

  Log Message:
  -----------
  [clang][analyzer][NFC] UnixAPIMisuseChecker inherits from Checker<check::PreCall> (#83027)


  Commit: 730ca47a0cc7380def6df1d25b30c1378fd8bf14
      https://github.com/llvm/llvm-project/commit/730ca47a0cc7380def6df1d25b30c1378fd8bf14
  Author: Alejandro Álvarez Ayllón <alejandro.alvarez at sonarsource.com>
  Date:   2024-03-22 (Fri, 22 Mar 2024)

  Changed paths:
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h
    M clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
    M clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
    M clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp
    A clang/test/Analysis/getline-unixapi.c
    M clang/test/Analysis/stream.c

  Log Message:
  -----------
  [clang][analyzer] Model getline/getdelim preconditions and evaluation (#83027)

According to POSIX 2018.

1. lineptr, n and stream can not be NULL.
2. If *n is non-zero, *lineptr must point to a region of at least *n
   bytes, or be a NULL pointer.

Additionally, if *lineptr is not NULL, *n must not be undefined.


Compare: https://github.com/llvm/llvm-project/compare/6e755c51a916...730ca47a0cc7

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list