Issue 180187
Summary [LifetimeSafety] Detect use of a reference type as a use of underlying origin
Labels false-negative, clang:temporal-safety
Assignees
Reporter usx95
    We cannot currently detect this as a use-after-invalidation:

```cpp
void ReferenceToVectorElement() {
  std::vector<int> v = {1, 2, 3};
  int& ref = v[0];
  v.push_back(4);
  ref = 10;
  (void)ref;
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to