[analyzer][NFC] Remove useless class BuiltinBug
...because it provides no useful functionality compared to its base class `BugType`. A long time ago there were substantial differences between `BugType` and `BuiltinBug`, but they were eliminated by commit 1bd58233 in 2009 (!). Since then the only functionality provided by `BuiltinBug` was that it specified `categories::LogicError` as the bug category and it stored an extra data member `desc`. This commit sets `categories::LogicError` as the default value of the third argument (bug category) in the constructors of BugType and replaces use of the `desc` field with simpler logic. Note that `BugType` has a data member `Description` and a non-virtual method `BugType::getDescription()` which queries it; these are distinct from the member `desc` of `BuiltinBug` and the identically named method `BuiltinBug::getDescription()` which queries it. This confusing name collision was a major motivation for the elimination of `BuiltinBug`. As this commit touches many files, I avoided functional changes and left behind FIXME notes to mark minor issues that should be fixed later. Differential Revision: https://reviews.llvm.org/D158855
Loading
Please sign in to comment