Hi,
the C++ rule cpp:S1235 “Polymorphic base class destructor should be either public virtual or protected non-virtual” shows a false positive with this code example:
__interface IRunner
{
void Run() const;
};
class Runner : public IRunner
{
public:
void Run() const override;
};
The rule will complain that the base class (IRunner) should have a virtual destructor. But we are using an __interface here, which is a Microsoft C++ extension, that already enforces this internally. It is not possible to provide a destructor in an __interface class. Microsoft documentation: __interface | Microsoft Learn
So in case an __interface is used, this rule should not be applied.
This was found in SonarQube 9.7.1.
Please let me know if you need more information.
Thanks and best regards