[clang] [clang] Diagnose dangling issues for the "Container<GSLPointer>" case. (PR #107213)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 5 02:10:50 PDT 2024


================
@@ -278,6 +278,8 @@ Improvements to Clang's diagnostics
 - The lifetimebound and GSL analysis in clang are coherent, allowing clang to
   detect more use-after-free bugs. (#GH100549).
 
+- Clang now diagnoses cases where a dangling `GSLOwner<GSLPointer>`` object is constructed, e.g. `std::vector<string_view> v = {std::string}` (#GH100526).
----------------
usx95 wrote:

```suggestion
- Clang now diagnoses cases where a dangling ``GSLOwner<GSLPointer>`` object is constructed, e.g. ``std::vector<string_view> v = {std::string()}`` (#GH100526).
```

https://github.com/llvm/llvm-project/pull/107213


More information about the cfe-commits mailing list