<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Fri, Dec 23, 2016 at 12:32 AM Richard Smith via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@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="auto" class="gmail_msg"><div class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg">On 22 Dec 2016 9:32 pm, "Chandler Carruth via cfe-commits" <<a href="mailto:cfe-commits@lists.llvm.org" class="gmail_msg" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:<br type="attribution" class="gmail_msg"><blockquote class="m_-4845048305351870359quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_quote gmail_msg"><div class="m_-4845048305351870359quoted-text gmail_msg"><div dir="ltr" class="gmail_msg">On Thu, Dec 22, 2016 at 5:41 PM Richard Smith via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" class="gmail_msg" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:</div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
==============================================================================<br class="m_-4845048305351870359m_7106263775898309689gmail_msg gmail_msg">
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)<br class="m_-4845048305351870359m_7106263775898309689gmail_msg gmail_msg">
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Thu Dec 22 19:30:39 2016<br class="m_-4845048305351870359m_7106263775898309689gmail_msg gmail_msg">
@@ -3343,6 +3343,10 @@ def note_ovl_candidate_incomplete_deduct<br class="m_-4845048305351870359m_7106263775898309689gmail_msg gmail_msg">
def note_ovl_candidate_inconsistent_deduction : Note<<br class="m_-4845048305351870359m_7106263775898309689gmail_msg gmail_msg">
"candidate template ignored: deduced conflicting %select{types|values|"<br class="m_-4845048305351870359m_7106263775898309689gmail_msg gmail_msg">
"templates}0 for parameter %1%diff{ ($ vs. $)|}2,3">;<br class="m_-4845048305351870359m_7106263775898309689gmail_msg gmail_msg">
+def note_ovl_candidate_inconsistent_deduction_types : Note<<br class="m_-4845048305351870359m_7106263775898309689gmail_msg gmail_msg">
+ "candidate template ignored: deduced values %diff{"<br class="m_-4845048305351870359m_7106263775898309689gmail_msg gmail_msg">
+ "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|"<br class="m_-4845048305351870359m_7106263775898309689gmail_msg gmail_msg">
+ "%1 and %3 of conflicting types for parameter %0|}2,4">;<br class="m_-4845048305351870359m_7106263775898309689gmail_msg gmail_msg"></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div><div class="gmail_msg">So, this new diagnostic isn't actually covered by any test. Not just is the wording not covered, literally it isn't emitted. There is a bug in the format that we didn't defend against -- having too many '|'s in the %diff alternatives. I added an assert to try to catch this in r290417 and it didn't trigger here because we never process this format.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Could you add a test covering this?</div></div></div></blockquote></div></div></div><div dir="auto" class="gmail_msg"><br class="gmail_msg"></div></div><div dir="auto" class="gmail_msg"><div dir="auto" class="gmail_msg">Both tests changed in this commit produce this diagnostic. We don't have coverage for the tree-format diagnostic here, though; is that what you're referring to?</div></div></blockquote><div><br></div><div>I mean, it is possible I messed something up, but i put a bunch of garbage text into the message and all tests passed.</div><div><br></div><div>And I put an extra '|' into other messages with %diff and tests assert failed. I don't think they were doing tree-format anything.</div><div><br></div><div>But the diagnostic I changed here passed even with my added assert....</div></div></div>