<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
<div class="WordSection1">
<p class="MsoNormal">I could try, but someone would have to tell me where to look in the code, im so new to clang, llvm, etc I might be a little out of my depth
<span style="font-family:"Segoe UI Emoji",sans-serif">😊</span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If this is a small change I could probably tackle it, any pointers ?</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">
Mail</a> for Windows 10</p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Ilya Biryukov <ibiryukov@google.com><br>
<b>Sent:</b> Monday, August 13, 2018 4:42:58 PM<br>
<b>To:</b> Sam McCall<br>
<b>Cc:</b> dan@walms.co.uk; clangd-dev@lists.llvm.org<br>
<b>Subject:</b> Re: [clangd-dev] ClangD - Dropped Diagnostic Outside of main file.</font>
<div> </div>
</div>
<div>
<div dir="ltr">Hi Dan, Sam,
<div><br>
</div>
<div>Synthesizing the diagnostics sounds good!</div>
<div>Also agree we should summarize all diags coming from the include in a single message to avoid potentially reporting a hundred diags at the same line.</div>
<div>Please also note that we can't catch any errors in function bodies, since we skip those. That's one of the reasons we don't report diags from other files now - we just can't do it reliably.</div>
<div><br>
</div>
<div>Missing files are actually the most common source of inconsistencies in the current file, though, reporting them is definitely the right thing to do!</div>
<div>Dan, would you be interested in coming up with a patch to fix this? We're always happy to get new contributions.<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Mon, Aug 13, 2018 at 4:37 PM Sam McCall via clangd-dev <<a href="mailto:clangd-dev@lists.llvm.org">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">+<a href="mailto:clangd-dev@lists.llvm.org" target="_blank">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" target="_blank">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_-9201414049175034663m_6008471536799145866LPlnk301251" href="https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fllvm-mirror%2Fclang-tools-extra%2Fblame%2F86961faaaf0b56b1c5dac2ed979987879cbc5294%2Fclangd%2FDiagnostics.cpp%23L376&data=02%7C01%7C%7C075d21f397cf4eb41cb908d601337975%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636697717921551196&sdata=j7Vra%2Bo6iFp%2B%2FPolZuCY%2FQ9uC4bEsn%2Fxn4wGdhsHoog%3D&reserved=0" originalsrc="https://github.com/llvm-mirror/clang-tools-extra/blame/86961faaaf0b56b1c5dac2ed979987879cbc5294/clangd/Diagnostics.cpp#L376" shash="ohbuPYkuQciLgZQ7hef7JNKJ0SEbburRNq+NWOpf8DmHgx5MVASnw7mmtvjWbEEMPl9YbsIbnAb0fcsjpOOiLNryWH5ggUaRdE3VsrMG0aYAAnHltz325+Ha8trxNZ2S+dFbUb8hhIXEAbLalYqgggfdKGznjlWM+rNN+7xZ2MI=" style="font-size:12pt" target="_blank">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="https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgithub.com%2FVitalElement%2FAvalonStudio&data=02%7C01%7C%7C075d21f397cf4eb41cb908d601337975%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636697717921551196&sdata=n50jsSh86WxnDXZyOWQSOWipimPcPS3puCqM5ABN0%2Bg%3D&reserved=0" originalsrc="http://github.com/VitalElement/AvalonStudio" shash="r9I9PFWLKlHFCwOFY7vzKy/OJflF5CN6HV+RO8uwkdR3X9TkMAfIodDscsvC+qoYuvKFCZVmZ6yAmRrTIpvsg+Tm6Lnsq+yj2STlz6ChL/Y7rgpOTCl2BwwIA1ZhBjltHNZ6R96VzNVB7x6wld1K4It00DyNx4mQPSsIffBRK6g=" 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>
_______________________________________________<br>
clangd-dev mailing list<br>
<a href="mailto:clangd-dev@lists.llvm.org" target="_blank">clangd-dev@lists.llvm.org</a><br>
<a href="https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.llvm.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fclangd-dev&data=02%7C01%7C%7C075d21f397cf4eb41cb908d601337975%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636697717921551196&sdata=gChHsh22mty8%2Fyxd%2Bn%2FBpzQJkr7FVD6TyEedmKnQVsc%3D&reserved=0" originalsrc="http://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev" shash="EZMrQUcTKAQudbs0sDQTVJm4WOBfzlSo6dpKGPgbq5YwEzK0kHCTk5SvIpJT7hw+ZsYNkncUfhuaWgDUmANRG36SxKM2x4ZaeO6aRMbUuAZObnErUiJMQDYeUF5kLzd4/V1Rb9KIw8DS0ne2YfMamfPmYfRtmQqoK6G4zUh7Z60=" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>Regards,</div>
<div>Ilya Biryukov</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>