<table><tr><td style="">qi437103 added a comment.
</td></tr></table><br /><div><div><p>Sorry I misread the last comment. No it's not affected by <tt style="background: #ebebeb; font-size: 13px;">nostdinc</tt> or <tt style="background: #ebebeb; font-size: 13px;">nostdinc++</tt>, as in current code those are not added to the command line.</p>

<p>After played with the command line directly, I find there might be more complex issues if we have to exclude standard includes.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><tt style="background: #ebebeb; font-size: 13px;">clang --cuda-path=/opt/cuda -std=c++11 -nostdinc -nostdinc++ -xcuda -isystem/usr/include/c++/6.3.1 -isystem/usr/include/c++/6.3.1/x86_64-pc-linux-gnu -isystem/usr/include/c++/6.3.1/backward -isystem/usr/local/include -isystem/usr/lib/clang/3.9.1/include -isystem/usr/include -imacros /home/aetf/definestest_files-clang.J25682 /home/aetf/develop/vcs/kdevelop/languages/clang/tests/files/cuda.cu</tt></li>
</ul>

<p>gives various undeclared identifier errors for clang 3.9 and 4.0</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><tt style="background: #ebebeb; font-size: 13px;">clang --cuda-path=/opt/cuda -std=c++11 -nostdinc++ -xcuda -isystem/usr/include/c++/6.3.1 -isystem/usr/include/c++/6.3.1/x86_64-pc-linux-gnu -isystem/usr/include/c++/6.3.1/backward -isystem/usr/local/include -isystem/usr/include -imacros /home/aetf/definestest_files-clang.J25682 /home/aetf/develop/vcs/kdevelop/languages/clang/tests/files/cuda.cu</tt></li>
</ul>

<p>Removing <tt style="background: #ebebeb; font-size: 13px;">-nostdinc</tt> and <tt style="background: #ebebeb; font-size: 13px;">-isystem/usr/lib/clang/3.9.1/include</tt> makes it work well for clang 4.0 but generates the same error for clang 3.9</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Whatever other arguemts passed in, <tt style="background: #ebebeb; font-size: 13px;">nocudainc</tt> will make it generate errors about undefined cuda keywords.</li>
</ul></div></div><br /><div><strong>TASK DETAIL</strong><div><a href="https://phabricator.kde.org/T5733" rel="noreferrer">https://phabricator.kde.org/T5733</a></div></div><br /><div><strong>To: </strong>qi437103<br /><strong>Cc: </strong>mwolff, kfunk, kdevelop-devel, KDevelop, qi437103, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger<br /></div>