D15605: kdev-astyle : upgrade libastyle to v3.1

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Fri Sep 21 12:59:14 BST 2018


kossebau added a comment.


  In D15605#329363 <https://phabricator.kde.org/D15605#329363>, @rjvbb wrote:
  
  > Would this be OK as a fix?
  
  
  I cannot tell, as I still haven't found any API docs for astyle, at least one which has a comment about this new method. So I have no idea what contract one should implement for `ASSourceIterator::getPeekStart()` and what values are expected when. In the code we have imported here there is only a single usage of that call, which is in that assert.
  "If you have inherited this class to access the formatter, you will need to add a method similar to getPeekStart() in the ASStreamIterator class in astyle_main.h." from http://astyle.sourceforge.net/news.html is the only info I have, which leaves lots of room.
  Have you seen any docs for that method?
  
  Based on that a fix could also be to always return `0` ;)
  
  Your proposed fix might work or not, from what I understood on the quick look at astyle code that assert wants to make sure any other peeking has been done, so peekStart == 0 means kind of the no peeking on-going.
  In any case that method implementation needs to have some comment that we added ti without really knowing what it should do, so future code readers do not have to scratch their head what we knew they do not.

REPOSITORY
  R32 KDevelop

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

To: rjvbb, #kdevelop, kfunk
Cc: kossebau, kfunk, pino, apol, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180921/d67775d5/attachment.html>


More information about the KDevelop-devel mailing list