[PATCH] Use 'override/final' instead of 'virtual' for overridden methods

Alexander Kornienko alexfh at google.com
Thu Apr 9 10:33:26 PDT 2015


In http://reviews.llvm.org/D8925#153913, @craig.topper wrote:

> A lot of these seem to be destructors. Do we really want override on
>  destructors? It's sort of implicit when the class isn't a base class.


Destructors are not much different from other methods in this regard: when you forget to specify `virtual` on the base class destructor, `override` on the derived one's will make compiler complain. Without `override` the code will compile fine, but will do something wrong.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D8925

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list