- Mention the name of the virtual function. This should help when the warning appears in a complicated expression and it's unclear what part of the expression it is about.
- Calling a pure virtual function always sinks the analysis, even if the checker is not in pure-only mode.
- Refactor/modernize the code a bit.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
- Print only class name::method name instead of a fully qualified name, because fully qualified names may get pretty long.
- Remove more dead code.
Comment Actions
One more thing: explain the consequences of the bug, so that it was obvious what the problem is.
Comment Actions
When I started programming I read that the programming is British English, but LLVM project has more 'behavior' than 'behaviour', so as being democratic it should be fine. Thanks!
Comment Actions
Hi Artem,
The patch looks good to me. I prefer a fully qualified name, however, but it is a matter of taste.
Comment Actions
- Fix checker names for consumers that display them (eg., clang-tidy). Add a test.
- Change bug descriptions: "Call to virtual function during construction or destruction" -> "Pure virtual method call" | "Unexpected loss of virtual dispatch"
- Remove the suggestion to explicitly qualify the call. It is incorrect for nested stack frames, as it may affect the behavior when the same function is called from elsewhere.
- Make the category reusable, fix capitalization to stay similar to other bug categories.