<div class="gmail_quote">On Mon, Sep 26, 2011 at 8:16 AM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Sep 25, 2011, at 6:44 PM, Chandler Carruth wrote:<br>
<br>
> Author: chandlerc<br>
> Date: Sun Sep 25 20:44:29 2011<br>
> New Revision: 140497<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=140497&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=140497&view=rev</a><br>
> Log:<br>
> Remove support for splitting word-wrapped diagnostic messages on newline<br>
> characters. I could find no newline character in a diagnostic message,<br>
> and adding an assert to this code never fires in the testsuite.<br>
><br>
> I think this code is essentially dead, and was previously used for<br>
> a different purpose. If I just don't understand how it is we can end up<br>
> with a newline here please let me know (with a test case?) and I'll<br>
> revert.<br>
<br>
</div>It wasn't dead code. At least, it shouldn't have been :)<br>
<br>
Here's a test case:<br>
<br>
struct B {<br>
  void f();<br>
};<br>
<br>
struct D1 : B { };<br>
struct D2 : B { };<br>
<br>
struct DD : D1, D2 {<br>
  void g() { f(); }<br>
};<br>
<br>
the diagnostic we used to get:<br>
<br>
t.cpp:9:14: error: non-static member 'f' found in multiple base-class subobjects<br>
      of type 'B':<br>
    struct DD -> struct D1 -> struct B<br>
    struct DD -> struct D2 -> struct B<br>
  void g() { f(); }<br>
             ^<br>
t.cpp:2:8: note: member found by ambiguous name lookup<br>
  void f();<br>
       ^<br>
<br>
and we now get:<br>
<br>
t.cpp:9:14: error: non-static member 'f' found in multiple base-class subobjects<br>
      of type 'B': struct DD -> struct D1 -> struct B struct DD -> struct D2 -><br>
      struct B<br>
  void g() { f(); }<br>
             ^<br>
t.cpp:2:8: note: member found by ambiguous name lookup<br>
  void f();<br>
       ^<br>
<br>
You couldn't find the newline because they are generated by Sema.</blockquote><div><br></div><div>I also checked that the test suite didn't care... ;] Anyways, added back (and better) in r140538 with a test case so it stays working now. =] Thanks for catching this one. </div>
</div>