Use of BuiltinBug is replaced by BugType.
Class BuiltinBug seems to have no benefits and is confusing.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Fixed failed tests because change of bug category from "Logic error" to "Memory error".
Lets make sure that we invite others from the community to participate, here and on other patches as well. Otherwise, LGTM.
clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp | ||
---|---|---|
215 | Maybe "is definitely null" here? Otherwise it can be pretty confusing with a double negation. | |
clang/test/Analysis/Inputs/expected-plists/conditional-path-notes.c.plist | ||
270 ↗ | (On Diff #280385) | I might've missed some discussions on that matter, so please correct me on that. |
clang/test/Analysis/Inputs/expected-plists/conditional-path-notes.c.plist | ||
---|---|---|
270 ↗ | (On Diff #280385) | I can not decide which is better, "logic error" can be said for almost every possible bug. Here the problem is at least related to memory handling. The reference of undefined pointer value is "logic error" too (it is known that the value was not initialized) but a memory error (try to access invalid or valid but wrong address). Probably "pointer handling error" is better? |
BuiltinBug is deprecated and we should be using BugType anyway
Like, i've never heard of BuiltinBug being deprecated but i'm pretty happy that it gets removed :)
clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp | ||
---|---|---|
215 | Also this entire comment should be inside the if-statement, on the same level as the next comment. | |
clang/test/Analysis/Inputs/expected-plists/conditional-path-notes.c.plist | ||
270 ↗ | (On Diff #280385) | Maybe let's not change it then, if there are no clear pros or cons? Users already got used to it. |
Changed MemoryError back to LogicError.
Improved placement and text of changed comment.
Maybe "is definitely null" here? Otherwise it can be pretty confusing with a double negation.