[Differential] [Updated] D450: Fix problem with include paths with clang language parser

mwolff (Milian Wolff) noreply at phabricator.kde.org
Sun Oct 25 15:33:58 UTC 2015


mwolff added a comment.

I agree that it's a good idea to have the check in, but please rewrite the check slightly to simplify the code.

Also, I guess you should fix the custom project manager to not add empty paths.


INLINE COMMENTS
  languages/clang/duchain/parsesession.cpp:90 simplify, and reduce the indentation depth of the code below by instead writing:
  
  ```
  if (url.isEmpty()) {
      continue;
  }
  
  const auto path = url.toLocalFile().toUtf8();
  ...
  ```
  languages/clang/duchain/parsesession.cpp:94 sure, you can add the `isDir` check if that helps, that only returns true if the path exists. But is it really bad to pass non-existing, or non-dir, paths to clang? I don't think so, thus we shouldn't need to do anything here?

REPOSITORY
  rKDEVELOP KDevelop

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: amccann, kfunk, mwolff
Cc: andric, kdevelop-devel


More information about the KDevelop-devel mailing list