Review Request 111796: Add a simple recursion counter to setSpecializedFrom

Andreas Pakulat apaku at gmx.de
Tue Jul 30 18:50:20 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111796/
-----------------------------------------------------------

(Updated July 30, 2013, 6:50 p.m.)


Review request for KDevelop.


Changes
-------

Reworked the fix, instead of the identity check adding a simple recursion counter.

As said in the commit message, I was not able to write a test for this so far (see http://paste.kde.org/p10250e4b/ for my try). However all tests in languages/cpp/cppduchain still pass as much as before (codeanalysistest failed before as well).


Summary (updated)
-----------------

Add a simple recursion counter to setSpecializedFrom


Description (updated)
-------

Add a simple recursion counter to setSpecializedFrom

This prevents endless recursions into this function, when copying a template
specialization and insert the copy directly below the existing function this
happened. Unfortunately its not clear why that happens or what a better fix
is, but this does not seem to have any bad side-effects and such a duplicated
specialization is just an intermediate step anyway.

I've tried writing a test for this, but it seems just parsing the same code
is not sufficient to trigger the recursion.


Diffs (updated)
-----

  languages/cpp/cppduchain/templatedeclaration.cpp b35ba13a0eacb5157a921cf96fdc22c091f625e1 

Diff: http://git.reviewboard.kde.org/r/111796/diff/


Testing
-------


Thanks,

Andreas Pakulat

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130730/a79f3196/attachment-0001.html>


More information about the KDevelop-devel mailing list