[Differential] [Request, 17 lines] D450: Fix problem with include paths with clang language parser
amccann (Andrew McCann)
noreply at phabricator.kde.org
Sun Oct 25 04:56:49 UTC 2015
amccann created this revision.
amccann added reviewers: kfunk, mwolff.
Herald added a subscriber: kdevelop-devel.
REVISION SUMMARY
Do not add empty paths to include arguments for clang parser
This fixed an issue I had with a custom build project.
I don't yet understand why empty paths were being passed in to the AddIncludes function.
While there is likely a problem elsewhere inserting the empty path, it seems reasonable to have this method be robust to bad input from plugins.
clang parser was getting called with commandline that looked like: "-I", "-I/path/to/dir"
Files located in "/path/to/dir" were not being found. Removing the "-I" fixed the problem.
TEST PLAN
Not sure how to reproduce my situation currently, other than manually ensuring an empty path is set.
I did verify that clang compiler itself exhibits this behavior from the commandline.
REPOSITORY
rKDEVELOP KDevelop
BRANCH
fix_clang_include_paths_problem
REVISION DETAIL
https://phabricator.kde.org/D450
AFFECTED FILES
languages/clang/duchain/parsesession.cpp
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: amccann, kfunk, mwolff
Cc: kdevelop-devel
More information about the KDevelop-devel
mailing list