<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/116842/">https://git.reviewboard.kde.org/r/116842/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On March 19th, 2014, 6:34 a.m. UTC, <b>Olivier Jean de Gaalon</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://git.reviewboard.kde.org/r/116842/diff/2/?file=255285#file255285line211" style="color: black; font-weight: bold; text-decoration: underline;">codecompletion/context.cpp</a>
<span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">211</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="kt">void</span> <span class="nf">parseTempalteTypes</span><span class="p">(</span><span class="n">CXCursor</span> <span class="n">cursor</span><span class="p">,</span> <span class="n">QStringList</span><span class="o">&</span> <span class="n">types</span><span class="p">)</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Are you sure this is necessary? What about clang_getSpecializedCursorTemplate?</pre>
</blockquote>
<p>On March 19th, 2014, 7:11 p.m. UTC, <b>David Stevens</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">No, that doesn't work. clang_getSpecializedCursorTemplate brings the cursor from an instantiation Foo<int> to the template Foo<T>.
It looks like new versions if libclang include a function clang_Type_getTemplateArgumentAsType, but that doesn't seemt to be available in libclang-3.4.</pre>
</blockquote>
<p>On March 19th, 2014, 8:12 p.m. UTC, <b>Olivier Jean de Gaalon</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I mean to recurse into the cursor returned by clang_getSpecializedCursorTemplate(templateBaseClass). That way the template paramaters are already correctly resolved, and you don't need to string-replace them at all.</pre>
</blockquote>
<p>On March 20th, 2014, 3:22 a.m. UTC, <b>David Stevens</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">That's not what clang_getSpecializedCursorTemplate does. You give clang_getSpecializedCursorTemplate a cursor that is a specialized or instantiated template, and it returns a cursor for the template from which it was specialized or instantiated. So the returned cursor has none of the necessary type information. Recursing into the returned cursor gives me the template parameter types, which I then match with the parsed argument types. I think clang_getSpecializedFromCursorTemplate would be a clearer name for the function.</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ah ok, I had it backwards. Just fix typo getTempalteTypes > getTemplateTypes then.
It would be nice to have a way to handle "virtual void std::vector<T> foobar()" as well, but it shouldn't hold up the patch.</pre>
<br />
<p>- Olivier Jean de</p>
<br />
<p>On March 20th, 2014, 3:22 a.m. UTC, David Stevens wrote:</p>
<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 David Stevens.</div>
<p style="color: grey;"><i>Updated March 20, 2014, 3:22 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdev-clang
</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;">Added virtual override completion to kdev-clang. Regular functions, template functions, and pure functions work. Signals and slots don't work, and const-qualified functions lose their qualifier. I'm not sure if the UI is completely correct.</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;">Manual testing.</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>codecompletion/context.cpp <span style="color: grey">(f6e85d6)</span></li>
<li>codecompletion/context.h <span style="color: grey">(aa6fcfb)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/116842/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>