[PATCH] Fix source range of destructor name

Olivier Goffart ogoffart at kde.org
Wed Jan 15 14:06:12 PST 2014


On Wednesday 15 January 2014 21:55:05 Richard Smith wrote:
> On Wed Jan 15 2014 at 1:51:41 PM, Justin Bogner <mail at justinbogner.com>
> 
> wrote:
> > Olivier Goffart <ogoffart at kde.org> writes:
> > > From d131af55d2dc2cb6b2f7242697eb44d2e5d042da Mon Sep 17 00:00:00 2001
> > > From: Olivier Goffart <ogoffart at 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?

Thanks 
-- 
Olivier





More information about the cfe-commits mailing list