D8634: Custom defines/includes: Improve handling of parser arguments
noreply at phabricator.kde.org
Fri Nov 3 02:05:56 UTC 2017
aaronpuchert created this revision.
aaronpuchert added a reviewer: KDevelop.
This fixes numerous bugs:
- Parser arguments for OpenCL and Cuda were not persisted.
- OpenCL standards are defined via -cl-std=, not -std=. That broke some assumptions.
- Custom arguments were detected (regardless of the actual language) by replacing the standard with c++11 and comparing against the default arguments for C++. This accidentally worked, but will fail if someone changes the default arguments.
Most of the hacks were left in place to keep the changes small, though
I'd argue that a proper solution needs to be found for most if the
To make the handling of parser arguments easier, I tried to use the
existing Utils::LanguageType enumeration as often as possible. Instead
of initializing the ParserArguments with an aggregate, I assigned the
arguments for each language separately to ensure there are no mix-ups in
I'm not very fond of the ParserArguments class/struct-hybrid, but I'm
not quite sure in which direction to go there.
Although KDevelop itself runs fine with these changes, there are some
problems in the TestDefinesAndIncludes, where the parser arguments,
includes or defines on an inode/directory are queried. But what are
these supposed to be? Directories can't be compiled.
To: aaronpuchert, #kdevelop
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel