<table><tr><td style="">thomassc updated this revision to Diff 52481.<br />thomassc added a comment.
</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/D18224">View Revision</a></tr></table><br /><div><div><p>Address comments. Now, problems are created for each "requested here" child diagnostic that refers to the current document. This may be more than just the last child diagnostic, since there may be multiple ones referring to the current document.</p>
<p>I used a hack to apply i18n() in cases where the replacement for the %1 parameter is only known later, e.g.: <tt style="background: #ebebeb; font-size: 13px;">i18n("In included file: %1", QLatin1String("%1"))</tt>. Is there a better solution? When leaving the replacement away, the function appended an error message to the string. Alternatively, if clang doesn't translate its messages yet, maybe this should also be left in English for consistency?</p>
<p>I wouldn't use the original description of the child diagnostic as-is, at least not without further marking the problem somehow as referring to another file. Otherwise, the diagnostic message may look unrelated to the line of code where it points to, which may be confusing. Prepending the message with something like "Requested here: " seemed like the easiest way to signal that it eventually relates to another line of code.</p>
<p>The unit tests now all pass (given that <a href="https://phabricator.kde.org/D18567" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/D18567</a> is applied).</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D18224?vs=49961&id=52481">https://phabricator.kde.org/D18224?vs=49961&id=52481</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D18224">https://phabricator.kde.org/D18224</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>plugins/clang/duchain/clangproblem.cpp<br />
plugins/clang/duchain/clangproblem.h<br />
plugins/clang/duchain/parsesession.cpp<br />
plugins/clang/tests/test_duchain.cpp<br />
plugins/clang/tests/test_duchain.h</div></div></div><br /><div><strong>To: </strong>thomassc, KDevelop, mwolff<br /><strong>Cc: </strong>aaronpuchert, pino, mwolff, kdevelop-devel, glebaccon, domson, antismap, iodelay, alexeymin, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd<br /></div>