On Mon, Oct 1, 2012 at 10:51 AM, Argyrios Kyrtzidis <[email protected]>wrote:
> Hi Kim, > > On Sep 30, 2012, at 12:29 AM, Kim Gräsman <[email protected]> wrote: > > > On Sat, Sep 29, 2012 at 11:50 PM, Kim Gräsman <[email protected]> > wrote: > >> > >> I would expect either '<stdio.h>' or > >> 'HEADER_NAME', but I think getting the expanded range ('<stdio.h>') > >> would be the most natural. > > > > Having looked into our callback implementation, we already handle > > macro expansion, and I think passing down the macro name range > > unexpanded gives more fidelity. So I change my mind -- I think getting > > the range as-written would be better ('HEADER_NAME'). Of course, > > assuming that FilenameRange.getBegin().isMacroID() is still true so > > callback sinks can expand it. > > Your suggestion is a bit contradictory, if we get the range 'HEADER_NAME', > then FilenameRange.getBegin().isMacroID() will be false (since it's > pointing at the beginning of the macro expansion). > The most fidelity option would be to give a range for '<stdio.h>' > (MacroIDs for begin and end), from which a callback sink can get at the > 'HEADER_NAME' file-level range. > Is this your recommendation ? > FWIW, I think it is, and it makes sense. ;] The source location structure is... confusing though. Richard, thoughts?
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
