Szelethus 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) ---------------- 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. ================ Comment at: clang/test/Analysis/stream-note.c:36-41 - FILE *F = fopen("file", "r"); // expected-note {{Stream opened here}} + FILE *F = fopen("file", "r"); if (!F) // expected-note@-1 {{'F' is non-null}} // expected-note@-2 {{Taking false branch}} return; - F = freopen(0, "w", F); // expected-note {{Stream reopened here}} ---------------- I think I preferred this, honestly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106262/new/ https://reviews.llvm.org/D106262 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits