erichkeane wrote:

I hate to pile on, but I think this isn't a sound design for an attribute (and 
also strongly dislike the name).  

It seems what you're looking for is some way to invalidate a variable 
statically. It does become fairly unsound thanks to control flow, unless you 
decide that :

```
int x;
if (a)
  drop_func(x);
...
if (!a)
  bar(x); // prohibited
```

Is an acceptable prohibition.  Thats just not control flow the FE can do 
(though, bugprone tests through tidy/etc are better about that).

But there is a VERY good reason that we have use-after-move where it is: 
because that is the most sound place to implement this.

https://github.com/llvm/llvm-project/pull/204318
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to