rnkovacs marked 3 inline comments as done.
rnkovacs added inline comments.
Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:296
+def MisusedPolymorphicObjectChecker: Checker<"MisusedPolymorphicObject">,
+ HelpText<"Reports deletions of polymorphic objects with
dcoughlin added a comment.
This looks like a useful checker! Have you run this on large codebases yet?
Does it find bugs? What kind of false positives do you see? Do you have a sense
of what additional work would it take to bring this out of alpha and have it
turned on by default?
Other than s
rnkovacs added a comment.
In https://reviews.llvm.org/D35796#819965, @NoQ wrote:
> It seems that this check is more powerful because it works by knowing the
> dynamic type of the object. However, i still suspect that
> `-Wnon-virtual-dtor` (the other one, without `delete-`, that simply asks to
rnkovacs updated this revision to Diff 108226.
https://reviews.llvm.org/D35796
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/CMakeLists.txt
lib/StaticAnalyzer/Checkers/MisusedPolymorphicObjectChecker.cpp
test/Analysis/MisusedPolymorphicObject.cpp
In
NoQ added a comment.
It seems that this check is more powerful because it works by knowing the
dynamic type of the object. However, i still suspect that `-Wnon-virtual-dtor`
(the other one, without `delete-`, that simply asks to make the destructor of
polymorphic classes virtual) covers most pr
aaron.ballman added a comment.
How does this check differ from the `-Wdelete-non-virtual-dtor` warning class
that comes out of the frontend?
https://reviews.llvm.org/D35796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.o
rnkovacs created this revision.
Herald added subscribers: baloghadamsoftware, xazax.hun, whisperity, mgorny.
This check warns if a derived type object is deleted through a base pointer
with a non-virtual destructor in its base class. It also places a note at the
last point where the derived-to-b