[PATCH] D132017: [clang][analyzer] Add errno modeling to StreamChecker

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 29 08:58:16 PDT 2022


balazske added a reviewer: martong.
balazske added inline comments.
Herald added a subscriber: rnkovacs.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:537
+                  errno_modeling::getNoteTagForStdSuccess(
+                      C, cast<NamedDecl>(Call.getDecl())->getNameAsString()));
   C.addTransition(StateNull);
----------------
steakhal wrote:
> I believe, `getDecl()` might return null, e.g. for calling a function pointer.
In this case the function should be known (we know that `fopen` is the called function, if the name is known the `Decl` should be known too), I think it can not be null here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132017



More information about the cfe-commits mailing list