[PATCH] D104640: [clang][Analyzer] Track null stream argument in alpha.unix.Stream .
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 21 23:58:59 PDT 2021
balazske added a comment.
Thanks for the quick accept.
The goal is to make this checker non-alpha.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:838
+ auto R = std::make_unique<PathSensitiveBugReport>(
+ BT_FileNull, "Stream pointer might be NULL.", N);
+ if (StreamE)
----------------
NoQ wrote:
> Stream pointer *is* null. There's no doubt about that.
>
> Path notes should look like one big complete sentence: "//Assuming pointer value is null// on line 83, ... //stream pointer ~~might be~~ is null// on line 88".
>
> This isn't part of this patch so I'm just spreading awareness^^
I do not like the messages in this checker but plan to improve it later. I observed that the last `.` character is removed from the messages, they can be like one sentence but multiple sentences.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104640/new/
https://reviews.llvm.org/D104640
More information about the cfe-commits
mailing list