<div dir="auto"><div>Sorry for the late response.<br><br><div class="gmail_quote"><div dir="ltr">Am So., 9. Dez. 2018, 17:04 hat Kadir Çetinkaya via clangd-dev <<a href="mailto:clangd-dev@lists.llvm.org">clangd-dev@lists.llvm.org</a>> geschrieben:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">As long as `/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.1/include` is specified in your compile command, clangd should be able to find that file.</div></blockquote></div></div><div dir="auto">True, but gcc does not need that include path. So if you have compile_commands.json generated for gcc, clangd (or any clang-based tool) won't find omp.h</div><div dir="auto"><br></div><div dir="auto">Asking the users to specify the -I to the gcc internal header is definitely not a nice UX, for the same reasons we don't ask to specify a path to the C++ STL and auto-detect it instead.</div><div dir="auto">(It's a bit different with omp.h, since it's actually part of the gcc internal headers and adding those to include dirs is not a good idea. I assume that's the reason we don't have auto-detection in the first place.)</div><div dir="auto"><br></div><div dir="auto">So it seems we have a few options:</div><div dir="auto">- tell clangd to use the third-party, but not gcc-internal, OpenMP header.</div><div dir="auto">- ship the LLVM's OpenMP alongside clang/clangd. (Maybe it's already included in the llvm releases)</div><div dir="auto">- figure out a way to make clang detect compatible GCC's omp.h header without adding the whole internal gcc include dir to search paths.</div><div dir="auto"><br></div><div dir="auto">The last option is certainly the most user-friendly one, but it's probably too much work. I'd go with documenting this particular problem and providing one or two ways to workaround it.</div><div dir="auto"> </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 6, 2018 at 3:54 PM Daan De Meyer via clangd-dev <<a href="mailto:clangd-dev@lists.llvm.org" target="_blank" rel="noreferrer">clangd-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr">Installing the openmp package on Arch Linux made clangd find the omp.h header (/usr/include/omp.h). Is it possible to make clangd find gcc's omp.h as well (located at /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.1/include/omp.h on my system)?</div><div dir="ltr"><br></div><div>Regards,</div><div><br></div><div>Daan<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 6 Dec 2018 at 15:32, Daan De Meyer <<a href="mailto:daan.j.demeyer@gmail.com" class="m_-7737641288736920581cremed" target="_blank" rel="noreferrer">daan.j.demeyer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>clangd doesn't seem to find omp.h which results in lots of diagnostics errors. I tried adding "include/omp.h", <omp.h> to the CanonicalIncludes.cpp file but that didn't seem to make a difference. Can someone give me some pointers on how to make clangd recognize omp.h?</div><div><br></div><div>Regards,</div><div><br></div><div>Daan<br></div></div>
</blockquote></div>
_______________________________________________<br>
clangd-dev mailing list<br>
<a href="mailto:clangd-dev@lists.llvm.org" class="m_-7737641288736920581cremed" target="_blank" rel="noreferrer">clangd-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev" rel="noreferrer noreferrer" class="m_-7737641288736920581cremed" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev</a><br>
</blockquote></div></div></div>
_______________________________________________<br>
clangd-dev mailing list<br>
<a href="mailto:clangd-dev@lists.llvm.org" target="_blank" rel="noreferrer">clangd-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev" rel="noreferrer noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev</a><br>
</blockquote></div></div></div>