[all-commits] [llvm/llvm-project] e50131: [clang] Diagnose dangling issues for the "Containe...
Haojian Wu via All-commits
all-commits at lists.llvm.org
Wed Sep 11 04:21:20 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e50131aa068f74daa70d4135c92020aadae3af33
https://github.com/llvm/llvm-project/commit/e50131aa068f74daa70d4135c92020aadae3af33
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2024-09-11 (Wed, 11 Sep 2024)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Basic/AttrDocs.td
M clang/lib/Sema/CheckExprLifetime.cpp
M clang/test/Sema/warn-lifetime-analysis-nocfg.cpp
Log Message:
-----------
[clang] Diagnose dangling issues for the "Container<GSLPointer>" case. (#107213)
This pull request enhances the GSL lifetime analysis to detect
situations where a dangling `Container<GSLPointer>` object is
constructed:
```cpp
std::vector<std::string_view> bad = {std::string()}; // dangling
```
The assignment case is not yet supported, but they will be addressed in
a follow-up.
Fixes #100526 (excluding the `push_back` case).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list