[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 <<a \
href="mailto:ogoffart@kde.org">ogoffart@kde.org</a>> 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> > On Wed Jan 15 2014 at 1:51:41 PM, Justin Bogner <<a \
href="mailto:mail@justinbogner.com" target="_blank">mail@justinbogner.com</a>><br> \
><br> > wrote:<br>
> > Olivier Goffart <<a href="mailto:ogoffart@kde.org" \
target="_blank">ogoffart@kde.org</a>> writes:<br> > > > From \
d131af55d2dc2cb6b2f7242697eb44<u></u>d2e5d042da Mon Sep 17 00:00:00 2001<br> > \
> > From: Olivier Goffart <<a href="mailto:ogoffart@woboq.com" \
target="_blank">ogoffart@woboq.com</a>><br> > > > Date: Wed, 15 Jan 2014 \
19:45:12 +0100<br> > > > Subject: [PATCH] Fix source range of the destructor \
name.<br> > > ><br>
> > > The problem is that the destructor's DeclarationNameInfo do not \
have<br> > > > a TypeSourceInfo because Sema::GetNameForDeclarator requires \
the<br> > > > ParsedType to be a LocInfoType.<br>
> > ><br>
> > > Setting a proper TypeSourceInfo to the destructor changes the way \
it<br> > > > it printed (from '~Foo' to '~struct Foo'. \
Hence the change in<br> > > > DeclarationName.cpp which also fix a bug when \
printing operator names.<br> > > ><br>
> > > <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> > \
><br> > > 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