[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-commits
Subject:    Re: [PATCH] Fix source range of destructor name
From:       Richard Smith <metafoo () gmail ! com>
Date:       2014-01-15 22:12:45
Message-ID: 6817610417111657118 () gmail297201516
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Wed Jan 15 2014 at 2:07:59 PM, Olivier Goffart <ogoffart@kde.org> wrote:

> On Wednesday 15 January 2014 21:55:05 Richard Smith wrote:
> > On Wed Jan 15 2014 at 1:51:41 PM, Justin Bogner <mail@justinbogner.com>
> >
> > wrote:
> > > Olivier Goffart <ogoffart@kde.org> writes:
> > > > From d131af55d2dc2cb6b2f7242697eb44d2e5d042da Mon Sep 17 00:00:00
> 2001
> > > > From: Olivier Goffart <ogoffart@woboq.com>
> > > > Date: Wed, 15 Jan 2014 19:45:12 +0100
> > > > Subject: [PATCH] Fix source range of the destructor name.
> > > >
> > > > The problem is that the destructor's DeclarationNameInfo do not have
> > > > a TypeSourceInfo because Sema::GetNameForDeclarator requires the
> > > > ParsedType to be a LocInfoType.
> > > >
> > > > Setting a proper TypeSourceInfo to the destructor changes the way it
> > > > it printed (from '~Foo' to '~struct Foo'.  Hence the change in
> > > > DeclarationName.cpp which also fix a bug when printing operator
> names.
> > > >
> > > > http://llvm.org/bugs/show_bug.cgi?id=15125
> > >
> > > Please add a test with this. Some minor comments below.
>
> Thanks for the comments.
> Any hint on how the test should be?
> Is there already existing tests which tests source locations?
>

test/SemaCXX/sourceranges.cpp seems like a good fit for this test.

[Attachment #5 (text/html)]

<div>On Wed Jan 15 2014 at 2:07:59 PM, Olivier Goffart &lt;<a \
href="mailto:ogoffart@kde.org">ogoffart@kde.org</a>&gt; wrote:</div><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> On Wednesday 15 January 2014 21:55:05 Richard Smith \
wrote:<br> &gt; On Wed Jan 15 2014 at 1:51:41 PM, Justin Bogner &lt;<a \
href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.com</a>&gt;<br> \
&gt;<br> &gt; wrote:<br>
&gt; &gt; Olivier Goffart &lt;<a href="mailto:ogoffart@kde.org" \
target="_blank">ogoffart@kde.org</a>&gt; writes:<br> &gt; &gt; &gt; From \
d131af55d2dc2cb6b2f7242697eb44<u></u>d2e5d042da Mon Sep 17 00:00:00 2001<br> &gt; \
&gt; &gt; From: Olivier Goffart &lt;<a href="mailto:ogoffart@woboq.com" \
target="_blank">ogoffart@woboq.com</a>&gt;<br> &gt; &gt; &gt; Date: Wed, 15 Jan 2014 \
19:45:12 +0100<br> &gt; &gt; &gt; Subject: [PATCH] Fix source range of the destructor \
name.<br> &gt; &gt; &gt;<br>
&gt; &gt; &gt; The problem is that the destructor&#39;s DeclarationNameInfo do not \
have<br> &gt; &gt; &gt; a TypeSourceInfo because Sema::GetNameForDeclarator requires \
the<br> &gt; &gt; &gt; ParsedType to be a LocInfoType.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Setting a proper TypeSourceInfo to the destructor changes the way \
it<br> &gt; &gt; &gt; it printed (from &#39;~Foo&#39; to &#39;~struct Foo&#39;.  \
Hence the change in<br> &gt; &gt; &gt; DeclarationName.cpp which also fix a bug when \
printing operator names.<br> &gt; &gt; &gt;<br>
&gt; &gt; &gt; <a href="http://llvm.org/bugs/show_bug.cgi?id=15125" \
target="_blank">http://llvm.org/bugs/show_bug.<u></u>cgi?id=15125</a><br> &gt; \
&gt;<br> &gt; &gt; Please add a test with this. Some minor comments below.<br>
<br>
Thanks for the comments.<br>
Any hint on how the test should be?<br>
Is there already existing tests which tests source \
locations?<br></blockquote><div><br></div><div>test/SemaCXX/sourceranges.cpp seems \
like a good fit for this test.</div>



_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic