[PATCH] D64274: [analyzer] VirtualCallChecker overhaul.
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 16 16:15:46 PDT 2019
NoQ added a comment.
In D64274#1584974 <https://reviews.llvm.org/D64274#1584974>, @baloghadamsoftware wrote:
> Hmm, I still fail to understand the problem with the current `VirtualCall` checker. Is it unstable? Does it report many false positives?
Yeah, pretty much. It's basically defined to find non-bugs and so far i've seen no indication that a lot of them are actually bugs, but it's rather the opposite, and it's rather noisy. It defines a good practice to follow ("if you truly want to call a virtual function and you understand that no virtual dispatch will happen, add an explicit qualifier"), but i feel uncomfy to force this recommendation upon people by default. That's still a good check but that's not a kind of thing that people ask for when they're using the analyzer. Btw, this check could probably benefit from a fixit hint (which adds the missing qualifier).
When the function is pure virtual, it's an immediate UB, so it's something we can always warn about.
CHANGES SINCE LAST ACTION
More information about the cfe-commits