recognise #import directive in the context browser

Review Request #128276 - Created June 23, 2016 and submitted

Information
René J.V. Bertin
kdevelop
Reviewers
kdevelop

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 #imported instead of #included.
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.

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.

Milian Wolff
René J.V. Bertin
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit ef2355e6fcd0429d18422140ece1381fbbf7947c by René J.V. Bertin to branch master.
Loading...