<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">never mind to that last question -- it's obvious from the fields of the struct. But, that begs the question: should the deduping really be ignoring the associated fixes (that is, the `Fix` field)?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 23, 2019 at 1:44 PM Yitzhak Mandelbaum <<a href="mailto:yitzhakm@google.com">yitzhakm@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks! That code is indeed the problem, but not because of your revision. Fundamentally, the comparison does not take the fixes into account, which causes the problem I'm experiencing. This makes sense, except that the tidy check is emitting a diagnostic for two different *expanded* locations which are getting mapped back to the same expansion loc and, hence, being lost in the dedupe. As far as I can tell, the lossiness is happening here:<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">clang/lib/Frontend/DiagnosticRenderer.cpp, lines 118-127<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">which normalizes the reported location with SourceManager::getFileLoc() before saving it in a DiagnosticMessage. Do you know why the DiagnosticMessage requires that its location be in a file? (clang/include/clang/Tooling/Core/Diagnostic.h, line 37)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 23, 2019 at 11:43 AM Kristóf Umann <<a href="mailto:dkszelethus@gmail.com" target="_blank">dkszelethus@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>Hi!<div dir="auto"><br></div><div dir="auto">I just pushed this revision, could this be the issue? How recent is your clang?</div><div dir="auto"><a href="https://reviews.llvm.org/D65065" target="_blank">https://reviews.llvm.org/D65065</a><br></div><div dir="auto"><br></div><div dir="auto">+ Tibor Brunner</div><br>Cheers,</div><div dir="auto">Kristóf</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Fri, 23 Aug 2019, 17:39 Yitzhak Mandelbaum via cfe-dev, <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I've hit a case where a clang-tidy check is losing a diagnostic (w/ associated fix) when its associated location is the same as an earlier diagnostic. This happens even when the fix itself changes a different source range.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Is this working-as-intended? If so, is there any way to get clang-tidy to warn about the dropped fix, rather than dropping it silently? If not, any pointers to where this might be happening would be appreciated.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Yitzhak</div></div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" rel="noreferrer" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div></div>
</blockquote></div>
</blockquote></div>