[cfe-commits] [cfe-dev] automatically generated declarations in the AST

Sean Hunt rideau3 at gmail.com
Thu Aug 19 12:09:52 PDT 2010


On 08/19/2010 12:53 PM, Jan Bierbaum wrote:
> Douglas Gregor meinte am 19.08.2010 19:13:
>>> Is there any mechanism to identify automatically generated nodes
>>> inside the AST?
>>
>> Decl::isImplicit()
>
> Thanks, that helps a lot!
>
> But even that does not cover all the auto insertions. The first
> instruction in every translation unit is
>
> typedef char* __builtin_va_list;
>
> which states its source location as<built-in>:102:15. This is not
> marked implicit. I guess it's from some internal include directive. In
> that case I can just check that it doesn't come from the main file. Are
> there any other things like that I should keep an eye on?

Yes, this is in the builtin prelude put at the front of every TU, which 
also includes things like predefined macros and the like.

Sean



More information about the cfe-commits mailing list