[cfe-commits] [patch] Expose HeaderSearch::SearchDirs to tools
dgregor at apple.com
Sun Mar 6 09:37:52 PST 2011
On Feb 25, 2011, at 5:14 AM, Paul Holden wrote:
> Apologies for pinging this. I was hoping for some feedback on the attached patch, which exposes HeaderSearch::SearchDirs for use by analysis tools (such as include-what-you-use - more details below).
> It does break the encapsulation of SearchDirs, and I'm happy to consider an alternative approach. However it is fairly trivial and mirrors the behaviour header_file_begin/end/size().
Sorry for the delay. Committed as r127122, thanks!
>> -----Original Message-----
>> From: cfe-commits-bounces at cs.uiuc.edu [mailto:cfe-commits-
>> bounces at cs.uiuc.edu] On Behalf Of Paul Holden
>> Sent: 18 February 2011 14:46
>> To: cfe-commits at cs.uiuc.edu
>> Subject: [cfe-commits] [patch] Expose HeaderSearch::SearchDirs to tools
>> I was hoping to get some feedback on the attached patch.
>> I've been working on fixing a couple of bugs in the recently-released
>> 'include-what-you-use' tool (http://code.google.com/p/include-what-you-
>> One thing we need to be able to do is enumerate the search paths which
>> the preprocessor was initialised with. My current solution relies on
>> enumerating the paths stored in HeaderSearch::SearchDirs.
>> Unfortunately this doesn't appear to be exposed in any way, and that's
>> that the attached patch does.
>> I suppose it's a little contentious as it breaks the encapsulation that
>> HeaderSearch achieves. An alternative approach would be to add
>> functionality to HeaderSearch which takes an absolute path, and returns
>> a matching DirectoryLookup. If that sounds like a better plan then I'll
>> try it out and submit another patch for review.
> 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
More information about the cfe-commits