[clang] [clang][analyzer] Add StreamChecker note tags for "indeterminate stream position". (PR #83288)
Balázs Kéri via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 29 07:43:45 PST 2024
================
@@ -313,6 +232,9 @@ class StreamChecker : public Checker<check::PreCall, eval::Call,
BugType BT_ResourceLeak{this, "Resource leak", "Stream handling error",
/*SuppressOnSink =*/true};
+ const char *FeofNote = "Assuming stream reaches end-of-file here";
+ const char *FerrorNote = "Assuming this stream operation fails";
----------------
balazske wrote:
I would leave these as `const char *` in the file scope. `std::string` is probably not good for global (or static) variables.
https://github.com/llvm/llvm-project/pull/83288
More information about the cfe-commits
mailing list