The report of NULL stream was removed in commit 570bf97.
The old reason is not actual any more because the checker dependencies are changed.
It is not good to eliminate a failure state (where the stream is NULL) without
generating a bug report because other checkers are not able to find it later.
The checker did this with the NULL stream pointer, and because this checker
runs now before other checkers that can detect NULL pointers, the null pointer
bug was not found at all.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Ah yes, finally this sorts itself out.
We also had to revert 570bf972f5adf05438c7e08d693bf4b96bfd510a because we use the Stream checker but not the StdLibFunc checker, so in our case after a rebase suddenly some important reports "disappeared", thus we reverted the cause.
As more and more patches came to the stdlibfunc checker, I worried about maintaining that revert. Finally, this patch will resolve it, so we don't have to do it ourselves.
Thanks!
clang/include/clang/StaticAnalyzer/Checkers/Checkers.td | ||
---|---|---|
553 | What's the purpose of this hunk? |
clang/include/clang/StaticAnalyzer/Checkers/Checkers.td | ||
---|---|---|
553 | The intent was that NonNullParamChecker should find a null pointer problem before StreamChecker and have a fixed priority of the warnings. But NonNullParamChecker probably does not apply to the stream functions because there are no nonnull attributes (this may be possible?) and no references. No tests fail if this line is removed. |
clang/include/clang/StaticAnalyzer/Checkers/Checkers.td | ||
---|---|---|
553 | Okay, I see. Choose as you want. I don't mind. |
What's the purpose of this hunk?