<div dir="ltr">+<a href="mailto:clangd-dev@lists.llvm.org">clangd-dev@lists.llvm.org</a><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 10, 2018 at 12:13 AM Dan Walmsley <<a href="mailto:dan@walms.co.uk">dan@walms.co.uk</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 style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
Hi, I hope you dont mind me contacting you directly.</div></div></blockquote><div>I don't mind at all, but I'm out on parental leave so can't give this the attention it deserves. Adding the dev list.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt"><a id="m_6008471536799145866LPlnk301251" href="https://github.com/llvm-mirror/clang-tools-extra/blame/86961faaaf0b56b1c5dac2ed979987879cbc5294/clangd/Diagnostics.cpp#L376" target="_blank" style="font-size:12pt">https://github.com/llvm-mirror/clang-tools-extra/blame/86961faaaf0b56b1c5dac2ed979987879cbc5294/clangd/Diagnostics.cpp#L376</a></div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
I am integrating ClangD with an open source IDE. I have come across a minor issue, but its most likely my inexperience with clangd.</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<br>
</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
So if I have a file that includes another file and that file has an include that cant be found, the diagnostics for that missing include get dropped.</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<br>
</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
How would I be able to indicate to the users that there is a missing include file, or get hold of the dropped diagnostic without the user having to open that file first?</div></div></blockquote><div>So if we're dropping the "foo.h was not found" diagnostic when the missing file is directly included by the active file, this is just a bug we should fix. (I seem to recall this might be happening, at least in some situations).</div><div><br></div><div>For diagnostics that occur in other files, we do currently just drop them, but we should do something smarter. (This includes transitive includes like main.cc -> foo.h -> bar.h where bar.h is missing, but also if foo.h has a syntax error).</div><div><br></div><div>I'd suggest we synthesize a diagnostic at the #include site that says something like:</div><div><br></div><div>> Included file had errors:<br></div><div>></div><div>> foo.h:21: Missing ';'</div><div>> foo.h:43: No such member 'qux', did you mean 'quux'</div><div>> ...</div><div><br></div><div>What do you think?</div><div>(And anyone on clangd-dev want to take this up before I get back to work?)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
Any hints or advice is greatly appreciated.</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<br>
</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
Many Thanks</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<br>
</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
Dan - working on AvalonStudio <a href="http://github.com/VitalElement/AvalonStudio" target="_blank">http://github.com/VitalElement/AvalonStudio</a></div></div></blockquote><div>Hadn't heard about AvalonStudio, will check it out!</div><div>Please hit up clangd-dev if we can help! </div></div></div>