<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/120086/">https://git.reviewboard.kde.org/r/120086/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The problem without the code inside <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">makeId</code> is the following:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Consider the file test.cpp:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%"><span style="color: #008000; font-weight: bold">class</span> <span style="color: #0000FF; font-weight: bold">Foo</span> {
<span style="color: #B00040">void</span> myfunction();
};
<span style="color: #B00040">void</span> Foo<span style="color: #666666">::</span>myfunction()
{
}
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Now running <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">duchainify test.cpp -f all-declarations-and-uses-and-AST --dump-symboltable</code> results in:</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">PersistentSymbolTable<span style="color: #666666">:</span>
Item <span style="color: #008000; font-weight: bold">in</span> symbol<span style="color: #666666">-</span>table<span style="color: #666666">:</span> <span style="color: #BA2121">"Foo"</span> <span style="color: #666666">-</span> localIndex<span style="color: #666666">:</span> <span style="color: #666666">1</span> <span style="color: #666666">-</span> url<span style="color: #666666">:</span> <span style="color: #BA2121">"test.cpp"</span> <span style="color: #666666">-</span> range<span style="color: #666666">:</span> <span style="color: #666666">[(0,</span> <span style="color: #666666">6)</span> <span style="color: #666666">,</span> <span style="color: #666666">(0,</span> <span style="color: #666666">9)</span> <span style="color: #666666">]</span>
Item <span style="color: #008000; font-weight: bold">in</span> symbol<span style="color: #666666">-</span>table<span style="color: #666666">:</span> <span style="color: #BA2121">"myfunction"</span> <span style="color: #666666">-</span> localIndex<span style="color: #666666">:</span> <span style="color: #666666">3</span> <span style="color: #666666">-</span> url<span style="color: #666666">:</span> <span style="color: #BA2121">"test.cpp"</span> <span style="color: #666666">-</span> range<span style="color: #666666">:</span> <span style="color: #666666">[(4,</span> <span style="color: #666666">10)</span> <span style="color: #666666">,</span> <span style="color: #666666">(4,</span> <span style="color: #666666">20)</span> <span style="color: #666666">]</span>
Item <span style="color: #008000; font-weight: bold">in</span> symbol<span style="color: #666666">-</span>table<span style="color: #666666">:</span> <span style="color: #BA2121">"Foo::myfunction"</span> <span style="color: #666666">-</span> localIndex<span style="color: #666666">:</span> <span style="color: #666666">2</span> <span style="color: #666666">-</span> url<span style="color: #666666">:</span> <span style="color: #BA2121">"test.cpp"</span> <span style="color: #666666">-</span> range<span style="color: #666666">:</span> <span style="color: #666666">[(1,</span> <span style="color: #666666">9)</span> <span style="color: #666666">,</span> <span style="color: #666666">(1,</span> <span style="color: #666666">19)</span> <span style="color: #666666">]</span>
</pre></div>
</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">myfunction</code> is obviously wrong here, it should be inside the <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: inherit;">Foo</code> scope. That's why we either need the hack from oldcpp (what I did) or a helper context.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Anyway. Commit this for now, I'll take care of fixing the scoping issue.</p></pre>
<br />
<p>- Kevin Funk</p>
<br />
<p>On September 12th, 2014, 2:36 p.m. UTC, Sergey Kalinichev wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
<tr>
<td>
<div>Review request for KDevelop and Kevin Funk.</div>
<div>By Sergey Kalinichev.</div>
<p style="color: grey;"><i>Updated Sept. 12, 2014, 2:36 p.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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">This was accidentally broken by:<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
f17866db1bc24c198e87c028065796959f6dd135<br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
Author: Kevin Funk <a href="mailto:kfunk@kde.org" style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;">kfunk@kde.org</a><br style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;" />
Date: Mon Aug 4 16:53:06 2014 +0200</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;"><div class="codehilite" style="background: #f8f8f8"><pre style="line-height: 125%">Also fix ranges <span style="color: #008000; font-weight: bold">for</span> operator functions
</pre></div>
</p></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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">All tests pass.</p></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>duchain/tuduchain.cpp <span style="color: grey">(7d9b021)</span></li>
<li>tests/files/functiondefinitiondeclarations.cpp <span style="color: grey">(fe4050e)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/120086/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>