[cfe-commits] r140497 - /cfe/trunk/lib/Frontend/TextDiagnosticPrinter.cpp
Chandler Carruth
chandlerc at gmail.com
Mon Sep 26 09:45:59 PDT 2011
On Mon, Sep 26, 2011 at 8:16 AM, Douglas Gregor <dgregor at apple.com> wrote:
>
> On Sep 25, 2011, at 6:44 PM, Chandler Carruth wrote:
>
> > Author: chandlerc
> > Date: Sun Sep 25 20:44:29 2011
> > New Revision: 140497
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=140497&view=rev
> > Log:
> > Remove support for splitting word-wrapped diagnostic messages on newline
> > characters. I could find no newline character in a diagnostic message,
> > and adding an assert to this code never fires in the testsuite.
> >
> > I think this code is essentially dead, and was previously used for
> > a different purpose. If I just don't understand how it is we can end up
> > with a newline here please let me know (with a test case?) and I'll
> > revert.
>
> It wasn't dead code. At least, it shouldn't have been :)
>
> Here's a test case:
>
> struct B {
> void f();
> };
>
> struct D1 : B { };
> struct D2 : B { };
>
> struct DD : D1, D2 {
> void g() { f(); }
> };
>
> the diagnostic we used to get:
>
> t.cpp:9:14: error: non-static member 'f' found in multiple base-class
> subobjects
> of type 'B':
> struct DD -> struct D1 -> struct B
> struct DD -> struct D2 -> struct B
> void g() { f(); }
> ^
> t.cpp:2:8: note: member found by ambiguous name lookup
> void f();
> ^
>
> and we now get:
>
> t.cpp:9:14: error: non-static member 'f' found in multiple base-class
> subobjects
> of type 'B': struct DD -> struct D1 -> struct B struct DD -> struct D2
> ->
> struct B
> void g() { f(); }
> ^
> t.cpp:2:8: note: member found by ambiguous name lookup
> void f();
> ^
>
> You couldn't find the newline because they are generated by Sema.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110926/d0b9bb61/attachment.html>
More information about the cfe-commits
mailing list