[PATCH] D35796: [analyzer] Misused polymorphic object checker

2017-09-14 Thread Reka Kovacs via Phabricator via cfe-commits
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

[PATCH] D35796: [analyzer] Misused polymorphic object checker

2017-08-07 Thread Devin Coughlin via Phabricator via cfe-commits
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

[PATCH] D35796: [analyzer] Misused polymorphic object checker

2017-07-26 Thread Reka Kovacs via Phabricator via cfe-commits
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

[PATCH] D35796: [analyzer] Misused polymorphic object checker

2017-07-26 Thread Reka Kovacs via Phabricator via cfe-commits
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

[PATCH] D35796: [analyzer] Misused polymorphic object checker

2017-07-25 Thread Artem Dergachev via Phabricator via cfe-commits
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

[PATCH] D35796: [analyzer] Misused polymorphic object checker

2017-07-25 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D35796: [analyzer] Misused polymorphic object checker

2017-07-24 Thread Reka Kovacs via Phabricator via cfe-commits
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