<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/114628/">https://git.reviewboard.kde.org/r/114628/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for KDevelop.</div>
<div>By Paweł Nowak.</div>
<p style="color: grey;"><i>Updated Dec. 22, 2013, 11:27 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Forgot to update some comments in test2.cpp</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=280244">280244</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdevelop
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This patch fixes incorrect parsing of declarations like "int (func)(int);" - where the declarator id is inside parentheses but it is not a function pointer, as well as some more issues. I have attached a file comparing old and new parsing results. It shouldn't affect anything that was already parsed successfully.
Additionally it eliminates some code duplication: now both parseDeclarator and parseAbstractDeclarator call parseDeclaratorInternal.
However, still a lot of old problems remain:
-function pointers are displayed as functions
-grouping in declarations like "int *(test[3])" is dropped so it becomes "int *test[3]"
-function types as template parameters are not handled correctly - "std::function<void(int)>" becomes "std::function<void>" somewhere in builders
and fixing them doesn't look that easy.
This is my first contribution to kdevelop and I hope I haven't broken anything :)</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Current git head is pretty broken so I tested using commit 4ac7ec339a29ee419f08d9ff29ce544e8a710c7c.
All tests pass (except for qtprinters, what is unrelated to this patch).</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>languages/cpp/cppduchain/contextbuilder.cpp <span style="color: grey">(668aed1)</span></li>
<li>languages/cpp/cppduchain/declarationbuilder.cpp <span style="color: grey">(b264858)</span></li>
<li>languages/cpp/cppduchain/expressionvisitor.cpp <span style="color: grey">(d62f3e2)</span></li>
<li>languages/cpp/parser/ast.h <span style="color: grey">(db20d74)</span></li>
<li>languages/cpp/parser/codegenerator.cpp <span style="color: grey">(2bc5f8e)</span></li>
<li>languages/cpp/parser/default_visitor.cpp <span style="color: grey">(9b43ae0)</span></li>
<li>languages/cpp/parser/parser.h <span style="color: grey">(933e2c8)</span></li>
<li>languages/cpp/parser/parser.cpp <span style="color: grey">(c59bd78)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/114628/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments (updated)</h1>
<ul>
<li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2013/12/22/eac1c5d3-5d1b-4916-9e2d-0ac825c1a92e__test2.cpp">Comparison between old and new declarator parsing</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>