[PATCH] D106262: [clang][analyzer] Use generic note tag in alpha.unix.Stream .
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 20 06:08:40 PDT 2021
balazske added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:380-391
+ if (BT == &BT_UseAfterClose)
+ Message = "Stream closed here";
+ else if (BT == &BT_UseAfterOpenFailed)
+ Message = "Assuming opening the stream fails here";
+ else if (BT == &BT_IndeterminatePosition)
+ Message = "Assuming this stream operation fails";
+ else if (BT == &BT_StreamEof)
----------------
Szelethus wrote:
> I have ambivalent feelings on this. I see what you are shooting for: display a specific `NoteTag` only for a specific `BugType`, though I wonder whether whether some of these notes would be nice for more than one. The only test case that changed seems to support my theory, or at least I like it better.
I will update the patch so that it supports multiple bug types in one note and bug type specific message. This will be done together with the adding of the new notes so there will be test for the new functionality.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106262/new/
https://reviews.llvm.org/D106262
More information about the cfe-commits
mailing list