[cfe-commits] [PATCH] Enabling externals tools to diffentiate quoted/angled/system dirs

Paul Holden Paul at mediamolecule.com
Mon May 23 23:48:48 PDT 2011


Fantastic - many thanks for the quick turnaround.

Paul

> -----Original Message-----
> From: thakis at google.com [mailto:thakis at google.com] On Behalf Of Nico
> Weber
> Sent: 24 May 2011 05:37
> To: Paul Holden
> Cc: cfe-commits at cs.uiuc.edu
> Subject: Re: [cfe-commits] [PATCH] Enabling externals tools to
> diffentiate quoted/angled/system dirs
> 
> Looks good as far as I can tell. I committed this in r131955.
> 
> On Mon, May 23, 2011 at 2:05 PM, Paul Holden <Paul at mediamolecule.com>
> wrote:
> > Hello,
> >
> > A while back I submitted a patch, applied in r127122, to expose
> HeaderSearch::SearchDirs for use by external tools.
> >
> > Include-what-you-use (http://code.google.com/p/include-what-you-use/)
> now makes use of this to help it figure out whether a given include
> file is a 'system' or 'user' include.
> >
> > I believed that HeaderSearch::SystemDirIdx would allow us to
> differentiate between search dirs specified with -I and with -system,
> but it seems that it's slightly inaccurately named. I'd assumed that it
> delimited the boundary between IncludeDirGroup::Angled and
> IncludeDirGroup::System, but it actually delimits the boundary between
> IncludeDirGroup::Quoted and IncludeDirGroup::Angled.
> >
> > This means that HeaderSearch::system_dir_begin()/end() actually
> enumerates directories specified with -I. Include-what-you-use has no
> way of distinguishing these dirs from those specified with -isystem.
> There are more details here: http://code.google.com/p/include-what-you-
> use/issues/detail?id=16#c24
> >
> > The attached patch resolves that problem, and exposes
> HeaderSearch::quoted_dir_begin()/end() and
> HeaderSearch::angled_dir_begin()/end().
> >
> > A couple of notes about the patch (I'm not sure if any of these are
> contentious):
> >
> > * I've changed the meaning of SystemDirIdx to delimit Angled/System
> dirs. AngleDirIdx now does this job. I think this is clearer.
> > * system_dir_begin()/end() now returns different results. I suspect
> IWYU is the only tool using this however.
> > * InitHeaderSearch::Realize() now performs an additional call to
> RemoveDuplicates(). I shouldn't think this is a performance issue
> however.
> >
> > Any feedback greatly appreciated.
> >
> > Regards,
> > Paul
> >
> >
> >
> >
> >
> >
> >
> > ________________________________
> >
> > Please consider the environment before printing this email :-)
> >
> > This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the sender immediately then delete this email. Any views expressed in
> this email are solely that of the individual and not representative of
> the company as a whole.
> >
> > Media Molecule Limited
> > Company Reg No 5665849
> > Registered in England.
> >
> >
> ______________________________________________________________________
> > This email has been scanned by the MessageLabs Email Security System.
> > For more information please visit http://www.messagelabs.com/email
> >
> ______________________________________________________________________
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> >
> >

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________




More information about the cfe-commits mailing list