<table><tr><td style="">mwolff created this revision.<br />mwolff added a reviewer: KDevelop.<br />Restricted Application added a subscriber: kdevelop-devel.<br />mwolff requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D9725" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Previously, the overload candidates never got an DUChain Declaration<br />
associated, meaning we could not inspect the API documentation in-line<br />
from the code completion. The reason was that most of the time the<br />
hinted declaration is also a valid "normal" completion item, and thus<br />
was found a second time. The findDeclaration call then returned null<br />
for the second call, since we added the declaration to the exclusion<br />
set after the first call. Instead, use a separate set for overload<br />
candidates to fix this. Note that the expanded argument hint item<br />
is still not showing any documentation in-line... Apparently there's<br />
more to fix to get this done properly.</p>

<p>While at it, also use the ArgumentHintItem for the situations where<br />
we (now) find a Declaration, to get proper current-argument<br />
highlighting.</p>

<p>Then fix the unit test to expect the default arguments. Though<br />
potentially this is clang-version dependent? Anyhow, this makes the<br />
test pass for me on my machine with libclang from LLVM 5.0.0.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D9725" rel="noreferrer">https://phabricator.kde.org/D9725</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>plugins/clang/codecompletion/context.cpp<br />
plugins/clang/tests/test_codecompletion.cpp</div></div></div><br /><div><strong>To: </strong>mwolff, KDevelop<br /><strong>Cc: </strong>kdevelop-devel<br /></div>