[PATCH] D140395: [clang][analyzer] Extend StreamChecker with some new functions.

Kristóf Umann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 2 08:28:18 PST 2023


Szelethus added a comment.

Does this patch fix any false positives from before, or is this just all new stuff? I ask, because I wonder whats the shortest path towards popping these checkers out of alpha, and fix what we already have. By no means am I saying that we should postpone landing this, but take a more directed attempt at tying off loose ends after this stack.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:952
 
+  // According to POSIX no change to 'errno' shall happen.
+
----------------
Why the comment? Seems like its solely `StdLibraryFunctionChecker`'s job to handle errno.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:979
 
+  // According to POSIX no change to 'errno' shall happen.
+
----------------
Same.


================
Comment at: clang/test/Analysis/stream-errno-note.c:1-2
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,alpha.unix.Stream,alpha.unix.Errno,apiModeling.StdCLibraryFunctions \
+// RUN:   -analyzer-config apiModeling.StdCLibraryFunctions:ModelPOSIX=true -analyzer-output text -verify %s
+
----------------
Can you break this line up, such that we have an `-analyzer-checker=` argument for each package/checker?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140395



More information about the cfe-commits mailing list