steakhal wrote:

> void opaque(const void* a, void* b);
> 
> int top() {
>     int *x;
>     opaque(&x, &x);
>     return *x; // I expected an issue here
> }

Great observation. I could craft an example breaking this.
https://godbolt.org/z/E5avb1xdn
```
void opaque(const int* a, int* b);
void clang_analyzer_value(int);

int top() {
    int x = 1;
    opaque(&x, &x);
    clang_analyzer_value(x); // we should not be sure it's 1.
    return 100 / (x - 1);
}
```

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

Reply via email to