For headers, also use source-file include paths and defines.
Review Request #121649 - Created Dec. 23, 2014 and discarded
We use the existing find-buddy-document architecture to find a source file corresponding to the current header file. If we find a match that also has a project file, we ask it for its include files. This fixes an issue, where when editing a header file Clang would never find the include paths. The reason is that in e.g. CMake, only the .cpp files have include paths, but not the .h files.
Rather embarassing that I didn't notice this sooner. I came up with a completely different solution: https://git.reviewboard.kde.org/r/121757/
The advantage of what I have is that it should work for headers that have no buddy but are otherwise used anywhere in the project.
Of course my solution doesn't actually work right now (CMake doesn't build targets, but that needs to be fixed?) so about this:
1. This might useful in addition to the other as a "first guess" before any "target" TUs are found/created
2. I /really/ think it would be better to use the TU of the cpp rather than merging the includes. Is that significantly more work?