D18224: Clang Plugin: Report some problems from included files

Milian Wolff noreply at phabricator.kde.org
Mon Jan 21 16:54:17 GMT 2019


mwolff added a comment.


  without digging into the patch myself (I'll have to see whether I can find time for this), could we solve more of the open TODOs by reporting problems for *all tail* child diagnostics that point at the current file? And then reference the "parent" from them somehow? I.e. I believe currently, we have something like this (bare with me, it was quite some time since I worked on this):
  
  - error in X
    - child in Y
    - child in Z
  
  Previous to this patch, we only report the "error in X" and show the children beneath. This change will also make it such that we also show the "error in X" problem for the "child in Z" location. Maybe we could just do that for *all* tail child diagnostics, i.e. `j == numChildDiagnostics - 1`?

INLINE COMMENTS

> clangproblem.cpp:99
>  
> +ClangProblem::ClangProblem() {}
> +

`= default;`

> parsesession.cpp:251
> +            problem->setFinalLocation(subproblem->finalLocation());
> +            problem->setDescription(i18n("Requested here: ") + problem->description());
> +            foundRequestedHere = true;

can't we use the original description of the child diagnostic?

> test_duchain.cpp:2003
> +    
> +    QEXPECT_FAIL("", "Currently no problem is reported for the function call if it is in the same file as the function", Continue);
> +    QCOMPARE(top->problems().count(), 2);

why is that? i.e. can you elaborate on this - do you know already what would be required to fix this too?

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D18224

To: thomassc, #kdevelop, mwolff
Cc: pino, mwolff, kdevelop-devel, glebaccon, hase, antismap, iodelay, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20190121/5d19e5fa/attachment.html>


More information about the KDevelop-devel mailing list