[cfe-commits] r164874 - in /cfe/trunk: include/clang/Lex/PPCallbacks.h include/clang/Lex/PreprocessingRecord.h lib/Frontend/DependencyFile.cpp lib/Frontend/DependencyGraph.cpp lib/Lex/PPDirectives.cpp lib/Lex/PreprocessingRecord.cpp lib/Lex/Prepr

Kim Gräsman kim.grasman at gmail.com
Mon Oct 1 11:21:53 PDT 2012


Hi all,

On Mon, Oct 1, 2012 at 8:01 PM, Chandler Carruth <chandlerc at google.com> wrote:
>>
>> 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.

Yes, apparently that's what I mean :)

The current implementation is close as it is, then, it just needs to
get the end of the range right.

Also, there's a case with concatenation;

#define HEADERNAME(suffix) foo ## suffix ## .h
#include HEADERNAME(bar)

I'm not sure if that's a different path or the same...?

Sorry for the confusion,
- Kim



More information about the cfe-commits mailing list