D18224: Clang Plugin: Report some problems from included files
noreply at phabricator.kde.org
Sun Feb 24 19:35:14 GMT 2019
thomassc updated this revision to Diff 52481.
thomassc added a comment.
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.
I used a hack to apply i18n() in cases where the replacement for the %1 parameter is only known later, e.g.: `i18n("In included file: %1", QLatin1String("%1"))`. 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?
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.
The unit tests now all pass (given that https://phabricator.kde.org/D18567 is applied).
CHANGES SINCE LAST UPDATE
To: thomassc, #kdevelop, mwolff
Cc: aaronpuchert, pino, mwolff, kdevelop-devel, glebaccon, domson, antismap, iodelay, alexeymin, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel