[cfe-dev] diff: builtin macros

Vladimir Kirillov proger at uaoug.org.ua
Thu Sep 2 10:11:25 PDT 2010


On 09:53 Thu 02 Sep, Chris Lattner wrote:
> Hi Vladimir,
> 
> What problem are you trying to solve with this? 
> Is it sufficient to see if the macro is in the predefines buffer?

Hi Chris!

Do you mean the Preprocessor::Predefines string by the predefines
buffer? (and suggest doing string::find() on it?)

I didn't consider taking it into account actually, but marked
the rest of internal macros to be really 'builtin' (aren't they built in
by the compiler by definition?).

My goal is to filter out such builtins in PPCallbacks for my data
gathering tool.

If you don't agree with this -- i think it would be proper to refactor
such mentions of builtins, like DefineBuiltinMacro in
lib/Frontend/InitPreprocessor.cpp, because such macros are not really
'builtin' within MacroInfo context.

Just for consistency's sake, sorry for all the pedantry :-)




More information about the cfe-dev mailing list