Re: [webkit-dev] virtual destructor annotations in subclasses

2019-10-08 Thread Yusuke Suzuki
While I don’t have any opinion about adding override on methods, I would like to see more `final` annotation in derived classes’ header when the classes are final and inherits something. In JSC, we leverage this `final` information in `jsCast<>` and `jsDynamicCast` to optimize the generated

Re: [webkit-dev] virtual destructor annotations in subclasses

2019-10-08 Thread Ryosuke Niwa
On Tue, Oct 8, 2019 at 4:24 PM Yury Semikhatsky wrote: > > This question came up in a code review where I annotated subclass's > destructor with 'override': > > class SuperClass { > public: > virtual ~SuperClass() {} > }; > > class Subclass : public SuperClass { > public: > ~Subclass()

[webkit-dev] virtual destructor annotations in subclasses

2019-10-08 Thread Yury Semikhatsky
Hi all, This question came up in a code review where I annotated subclass's destructor with 'override': class SuperClass { public: virtual ~SuperClass() {} }; class Subclass : public SuperClass { public: ~Subclass() *override*; }; The style guide recommends