| Issue |
180517
|
| Summary |
[LifetimeSafety] Suggest annotation for returning object with a pointer
|
| Labels |
clang:temporal-safety
|
| Assignees |
|
| Reporter |
emaxx-google
|
```c++
struct A {
int* ptr;
};
A Foo(int* ptr) {
return {ptr};
}
```
Expected the following warning when using `-Wlifetime-safety -Wlifetime-safety-suggestions`: `parameter in intra-TU function should be marked [[clang::lifetimebound]]`. Actual result on ToT - no warnings.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs