| Issue |
97471
|
| Summary |
-Wdangling warning on `std::unique_ptr<int>(nullptr).get()`.
|
| Labels |
clang:frontend,
clang:diagnostics
|
| Assignees |
|
| Reporter |
hokein
|
This is an interesting case:
```
const int* p2 = std::unique_ptr<int>(nullptr).get();
```
Clang emits a `object backing the pointer will be destroyed at the end of the full-_expression_` warning. For this case, we know that the result `p2` is `nullptr`, this is not a dangling case.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs