Hi, Bill,

Thank you for the info. 

> On Aug 21, 2024, at 17:36, Bill Wendling <isanb...@gmail.com> wrote:
> 
>> 
>> Bill, could you please provide a little bit more info on the possibility of 
>> a  new builtin __builtin_has_attribute() in CLANG?
>> 
> From what I gathered, it would require some moderate surgery to the
> Clang front-end to support "__builtin_has_attribute()". Parsing of
> attributes is done only in the context of the "__attribute__" keyword
> and would have to be refactored. That in itself would probably be a
> nice clean-up to the Clang front-end. The bigger issue is how to
> support an attribute as a node in the AST. We don't currently have a
> node like that in our AST, because attributes are associated with an
> AST node and aren't nodes in and of themselves. So it's a lot more
> work than it appears on the surface.
> 
> That said, Clang probably *should* support __builtin_has_attribute().
> The question is whether we should do it for this feature or wait? If
> we do it for this feature, I imagine that Clang's implementation of
> __builtin_get_counted_by() will be significantly delayed, but if it's
> the correct thing to do then we should bite the bullet.

>From the discussion so far, I think that __builtin_get_counted_by () might be 
>good enough.

Let me know if there is any objection on this.

Qing
> 
> -bw
> 

Reply via email to