Issue 120206
Summary -Wreturn-stack-address false positive
Labels clang:memory-safety
Assignees hokein
Reporter hokein
    https://gcc.godbolt.org/z/T3PW87TTW

```
 struct [[gsl::Pointer]] view {};
    struct S {
        view s;
 };
    struct [[gsl::Owner]] Q {
        const S& get() const [[clang::lifetimebound]];
    };
    view g(view b, int c) {
 return c > 1 ? Q().get().s : b; // bogus diagnostic on `Q()`.
    }
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to