[cfe-dev] [RFC] A dataflow analysis framework for Clang AST

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Mon Nov 8 13:00:51 PST 2021


On Mon, Nov 8, 2021 at 2:00 AM Dmitri Gribenko <gribozavr at gmail.com> wrote:

> On Sun, Nov 7, 2021 at 5:02 PM David Blaikie <dblaikie at gmail.com> wrote:
>
>> I guess this would subsume the Clang consumption attributes:
>> https://clang.llvm.org/docs/AttributeReference.html#consumed-annotation-checking
>> - could these older attributes then be reimplemented in terms of this new
>> infrastructure? (or broadened in other ways to better expose this
>> functionality)
>>
>
> Yes, it should be possible to reimplement
> llvm-project/clang/lib/Analysis/Consumed.cpp in terms of the proposed
> dataflow analysis framework.
>

Would it be reasonable to have that on your plan/timeline? Would be nice to
avoid the consumed analysis languishing as a dead end if it could be
migrated to the new stuff (& be a nice proof-of-concept/place to make this
new functionality live in an existing feature perhaps relatively early on
(not that I think the consumed warnings/analysis are widely used - though
I'm not sure)))


>
> Dmitri
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20211108/52bd01d7/attachment.html>


More information about the cfe-dev mailing list