negativ wrote:

> Adding deduced attributes should be a separate step in the ASTConsumers 
> pipeline. We take the AST, do some analysis and mutate the AST by adding the 
> deduced attributes to the relevant AST nodes, and only to those where it 
> makes sense.

Could you please point to some good example of using  ASTConsumers pipeline? 

> This worked for us downstream for a similar use-cases. This also side-steps 
> patching the CFG construction, because by the time we get there, we are 
> already done with the annotation phase thus, it would see the implict 
> (deduced) `analyzer_noreturn` attributes.

Wouldn't that mean we'd have to reimplement CFG's useful features like 
unreachable code detection?

> If I had time, I could probably try to upstream this part.

I'I'd appreciate it if you could point me to parts of the codebase I could look 
at to learn and try implementing the feature myself =)

https://github.com/llvm/llvm-project/pull/146355
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to