D21036: KCalCore: Misc clang-tidy fixes

Allen Winter noreply at phabricator.kde.org
Mon May 6 16:48:49 BST 2019


winterz added a comment.


  In D21036#461578 <https://phabricator.kde.org/D21036#461578>, @dvratil wrote:
  
  > Well, technically, calling virtual methods from ctor in dtor **in those particular cases** is safe and your changes do not have any impact, since the standard says that when a ctor/dtor calls a virtual function of the object currently under construction/destruction the override called is that of the current ctor's/dtor's class - in other words, it will never call an override in a more-derived class (and calling an override in a superclass is safe, because that one is already constructed/not yet destroyed). This would only be a problem (or undefined behavior, rather) if any of those methods were pure virtual, which they are not so this might be considered a false-positive from clazy.
  >
  > Edit: there's also some trickyness in this when non-linear inheritance in involved, but that's not the case here either.
  
  
  Right.  I will mark them as false positives in the code

REPOSITORY
  R172 KCalendar Core

REVISION DETAIL
  https://phabricator.kde.org/D21036

To: winterz, vkrause, mlaurent, dvratil
Cc: kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20190506/ffbf76bb/attachment.html>


More information about the kde-pim mailing list