Xazax-hun wrote:

Having an exploratory tool is useful, but I am wondering if we have sufficient 
information to make this determination. 

For example:
```
class Vector {
  int* m_ptr;
  ...
  int* data() { return m_ptr; }
};

class Span {
  int* m_ptr;
  ...
  int* data() { return m_ptr; }
};
```

`Span` and `Vector` here looks identical when we only look at the fields and 
the body of the `data` function. But they are very different in that `Vector` 
owns the data pointed by `m_ptr` while `Span` does not. 

Is the plan to manually distinguish between these cases? Unfortunately, many 
types can own some data and be a view for others, so a classification on the 
type level might not solve this.

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

Reply via email to