[clang] [clang] Add value_type attr, use it to add noalias when pass-by-value. (PR #95004)
Nikolas Klauser via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 10 12:27:27 PDT 2024
philnik777 wrote:
This is really sweet. However, I feel like this is a property that needs to propagate through types. We can't guarantee that a `std::vector<int, my_nasty_allocator<int>>` doesn't escape the pointer. Similarly, I think we'd like
```c++
struct my_pair {
int i;
std::string str;
};
```
to have this property.
https://github.com/llvm/llvm-project/pull/95004
More information about the cfe-commits
mailing list