<table><tr><td style="">aaronpuchert added a comment.
</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/D13613">View Revision</a></tr></table><br /><div><div><p>I guess this comes from the second test row ("ignore-moc-at-end")? I'm not sure if <tt style="background: #ebebeb; font-size: 13px;"><vector></tt> includes system headers, but I replaced it with <tt style="background: #ebebeb; font-size: 13px;"><cstdlib></tt>, which obviously includes <tt style="background: #ebebeb; font-size: 13px;"><stdlib.h></tt> from <tt style="background: #ebebeb; font-size: 13px;">/usr/include</tt>. That still works here.</p>

<p>Apparently <tt style="background: #ebebeb; font-size: 13px;">/usr/include/c++/v1</tt> contains files with the same names as the system headers, for example stdlib.h, which includes another stdlib.h. There are not so many wrappers on my machine, <tt style="background: #ebebeb; font-size: 13px;">/usr/include/c++/8/*.h</tt> matches only six files. But among them is stdlib.h, which includes <tt style="background: #ebebeb; font-size: 13px;">/usr/include/stdlib.h</tt> with this weird <tt style="background: #ebebeb; font-size: 13px;">#include_next</tt> mechanism.</p>

<p>stdlib.h:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">#if !defined __cplusplus || defined _GLIBCXX_INCLUDE_NEXT_C_HEADERS
# include_next <stdlib.h>
#else
# include <cstdlib>
// ...</pre></div>

<p>cstdlib:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">// Need to ensure this finds the C library's <stdlib.h> not a libstdc++
// wrapper that might already be installed later in the include search path.
#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
#include_next <stdlib.h>
#undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS</pre></div>

<p>That doesn't seem to be a problem.</p>

<p>What does KDevelop say when you  include <tt style="background: #ebebeb; font-size: 13px;"><vector></tt>? Does it show any problems? I can install libc++ on my system, but I'm not sure how I could convince DUChain/libclang to use it.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D13613">https://phabricator.kde.org/D13613</a></div></div><br /><div><strong>To: </strong>arrowd, KDevelop, mwolff<br /><strong>Cc: </strong>mwolff, aaronpuchert, kdevelop-devel, antismap, iodelay, vbspam, njensen, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd<br /></div>