llvm / llvm/llvm-project

Add support for tracking Container<Pointer>

Open
#175,025 1 comment 0 reactions 0 assignees View on GitHub
clang:temporal-safety
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

```cpp
#include

struct [[gsl::Owner]] T {};

struct [[gsl::Pointer]] S {
S(const T&);
};

std::optional f3() {
T t;
return S(t); // No error
}
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the supplied C++ example and tracing the existing tracking of gsl::Owner and gsl::Pointer values. Identify where std::optional is handled and determine how container-held pointers are represented. Done means the example produces the expected lifetime diagnostic without breaking existing tracking behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.