diff options
author | Haojian Wu <hokein.wu@gmail.com> | 2024-11-01 13:32:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-01 13:32:57 +0100 |
commit | f484a04d796123097572c5c2089fefa28e951747 (patch) | |
tree | d86162c2d86efa5dd064d352c138ee6c82332b51 /llvm/lib/CodeGen/SafeStack.cpp | |
parent | 83ce977b366a448609750630a6c1a23146c780d2 (diff) | |
download | llvm-f484a04d796123097572c5c2089fefa28e951747.zip llvm-f484a04d796123097572c5c2089fefa28e951747.tar.gz llvm-f484a04d796123097572c5c2089fefa28e951747.tar.bz2 |
[clang] Suppress a dangling false positive when owner is moved in member initializer. (#114213)
This patch extends the filtering heuristic to apply for the
Lifetimebound code path.
This will suppress a common false positive:
```
namespace std {
template<typename T>
struct unique_ptr {
T &operator*();
T *get() const [[clang::lifetimebound]];
};
} // namespace std
struct X {
X(std::unique_ptr<int> up) :
pointer(up.get()), owner(std::move(up)) {}
int *pointer;
std::unique_ptr<int> owner;
};
```
See #114201.
Diffstat (limited to 'llvm/lib/CodeGen/SafeStack.cpp')
0 files changed, 0 insertions, 0 deletions