diff options
author | Utkarsh Saxena <usx@google.com> | 2024-11-20 15:17:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-20 15:17:00 +0100 |
commit | c22bb6f5b1b43484b47dd896a147bf54f8f44c9a (patch) | |
tree | 4911a9baca83ec35df1bf4e2e5d315854663f91a /llvm/lib/Support/VirtualFileSystem.cpp | |
parent | 3e15bce9e1e144c0e568eed10010fa0e359e8ec2 (diff) | |
download | llvm-c22bb6f5b1b43484b47dd896a147bf54f8f44c9a.zip llvm-c22bb6f5b1b43484b47dd896a147bf54f8f44c9a.tar.gz llvm-c22bb6f5b1b43484b47dd896a147bf54f8f44c9a.tar.bz2 |
[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
This PR uses the existing lifetime analysis for the `capture_by`
attribute.
The analysis is behind `-Wdangling-capture` warning and is disabled by
default for now. Once it is found to be stable, it will be default
enabled.
Planned followup:
- add implicit inference of this attribute on STL container methods like
`std::vector::push_back`.
- (consider) warning if capturing `X` cannot capture anything. It should
be a reference, pointer or a view type.
- refactoring temporary visitors and other related handlers.
- start discussing `__global` vs `global` in the annotation in a
separate PR.
---------
Co-authored-by: Boaz Brickner <brickner@google.com>
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
0 files changed, 0 insertions, 0 deletions