Review Request 128276: recognise #import directive in the context browser
Milian Wolff
mail at milianw.de
Thu Jun 23 14:12:50 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128276/#review96818
-----------------------------------------------------------
Ship it!
Ship It!
- Milian Wolff
On June 23, 2016, 11:58 a.m., René J.V. Bertin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128276/
> -----------------------------------------------------------
>
> (Updated June 23, 2016, 11:58 a.m.)
>
>
> Review request for KDevelop.
>
>
> Repository: kdevelop
>
>
> Description
> -------
>
> gcc and clang both support `#import` as the ObjC-style synonym for `#include`. The clang parser thus has no troubles recognising the directive and as a result, code browsing and syntax highlighting work as expected when header files are `#import`ed instead of `#include`d.
> What doesn't work is context browsing: hovering the cursor over the #import directive doesn't pop up a tooltip containing the path to the headerfile allowing to open it.
>
> This patch contains a fix for the simple omission that is at cause.
>
>
> Diffs
> -----
>
> languages/clang/util/clangutils.cpp fc49f95
>
> Diff: https://git.reviewboard.kde.org/r/128276/diff/
>
>
> Testing
> -------
>
> #import directives now allow to obtain a tooltip with the path to the headerfile.
>
> Another fix is required elsewhere to apply to proper syntax highlighting: currently the whole line is shown in red and underlined.
>
> The clang/duchain/unknowndeclarationproblem.cpp file also contains explicit `#include` strings in `directiveForFile()`. If I understand the purpose of the function correctly there's no need for changing it.
>
>
> Thanks,
>
> René J.V. Bertin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160623/08b7a088/attachment.html>
More information about the KDevelop-devel
mailing list