<table><tr><td style="">aaronpuchert created this revision.<br />aaronpuchert added a reviewer: KDevelop.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D8634" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This fixes numerous bugs:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Parser arguments for OpenCL and Cuda were not persisted.</li>
<li class="remarkup-list-item">OpenCL standards are defined via -cl-std=, not -std=. That broke some assumptions.</li>
<li class="remarkup-list-item">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.</li>
</ul>

<p>Most of the hacks were left in place to keep the changes small, though<br />
I'd argue that a proper solution needs to be found for most if the<br />
issues.</p>

<p>To make the handling of parser arguments easier, I tried to use the<br />
existing Utils::LanguageType enumeration as often as possible. Instead<br />
of initializing the ParserArguments with an aggregate, I assigned the<br />
arguments for each language separately to ensure there are no mix-ups in<br />
the order.</p>

<p>I'm not very fond of the ParserArguments class/struct-hybrid, but I'm<br />
not quite sure in which direction to go there.</p>

<p>Although KDevelop itself runs fine with these changes, there are some<br />
problems in the TestDefinesAndIncludes, where the parser arguments,<br />
includes or defines on an inode/directory are queried. But what are<br />
these supposed to be? Directories can't be compiled.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>BRANCH</strong><div><div>parser-arguments</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8634" rel="noreferrer">https://phabricator.kde.org/D8634</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>plugins/custom-definesandincludes/compilerprovider/compilerprovider.cpp<br />
plugins/custom-definesandincludes/compilerprovider/settingsmanager.cpp<br />
plugins/custom-definesandincludes/compilerprovider/settingsmanager.h<br />
plugins/custom-definesandincludes/definesandincludesmanager.cpp<br />
plugins/custom-definesandincludes/kcm_widget/parserwidget.cpp<br />
plugins/custom-definesandincludes/kcm_widget/projectpathsmodel.cpp</div></div></div><br /><div><strong>To: </strong>aaronpuchert, KDevelop<br /><strong>Cc: </strong>kdevelop-devel<br /></div>