<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/D11136">View Revision</a></tr></table><br /><div><div><p>The Clang developers work really hard on compatibility with both GCC and MSVC, but I don't think they want to use the same defines and includes for that. For example, both Clang and GCC have their own private header files (on my machine, <tt style="background: #ebebeb; font-size: 13px;">/usr/lib64/gcc/x86_64-suse-linux/7/include</tt> and <tt style="background: #ebebeb; font-size: 13px;">/usr/lib64/clang/5.0.1/include/</tt>). These are quite similar, but not interchangeable. I don't think one can use one set of headers with the other compiler.</p>

<p>For the most part, I also use GCC as compiler, but I configure KDevelop to behave like Clang. Yes, my compiler will see something slightly different. So what? What matters is that both GCC and KDevelop's libclang parser implement the same C++ standard.</p>

<p>Since there is <tt style="background: #ebebeb; font-size: 13px;">clang-cl</tt>, I assume that Clang can also imitate MSVC to some extent. But I don't think spying on <tt style="background: #ebebeb; font-size: 13px;">cl</tt>s defines and includes and feeding them into libclang is necessary or sufficient for that. (Consider MS inline assembly, which Clang understands - but not by setting some defines.)</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/D11136">https://phabricator.kde.org/D11136</a></div></div><br /><div><strong>To: </strong>apol, KDevelop, mwolff<br /><strong>Cc: </strong>aaronpuchert, mwolff, kdevelop-devel<br /></div>