D4430: Port ClangClassHelper to also fill the include_files var

Kevin Funk noreply at phabricator.kde.org
Sun Mar 12 22:27:43 UTC 2017


kfunk accepted this revision.
kfunk added a comment.
This revision is now accepted and ready to land.


  Rest LGTM, patch should go into 5.1.
  
  The new code introduced in this patch will only be executed while creating from file templates, so there can't be potential regression in the Clang navigation / code completion support. But we'll fix generated code, which is good.

INLINE COMMENTS

> clangclasshelper.cpp:103
> +
> +struct IncludeArgumentShorterThan
> +{

Could turn that into a simple function, or even inline as lambda at the call-site

> clangclasshelper.cpp:181
> +                // Prefer items defined inside a target with non-empty includes.
> +                for (auto i: fileItems) {
> +                    item = i;

`auto i` -> `const auto& fileItem`

> clangclasshelper.cpp:192
> +
> +    const auto includepaths = includeManager->includes(item);
> +

`includepaths` -> `includePaths`

> clangclasshelper.cpp:201
> +
> +    const auto includefiles = UnknownDeclarationProblem::findMatchingIncludeFiles(QVector<Declaration*> {declaration.data()});
> +    if (includefiles.isEmpty()) {

`includefiles` -> `includeFiles`

REPOSITORY
  R32 KDevelop

BRANCH
  portIncludePathCreationClangClassHelper

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

To: kossebau, #kdevelop, mwolff, kfunk
Cc: kfunk, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170312/1c46e47f/attachment-0001.html>


More information about the KDevelop-devel mailing list