https://github.com/usx95 requested changes to this pull request.

Update: Checked by running this inside Google. This works badly with 
`-Wdangling` with `optional<View>`. I think that might be the reason why this 
was not done earlier as well.

This needs to be done only for Lifetime Safety (when 
`RunningUnderLifetimeSafety` is set).

Please also test this. This will likely fail with the current version.

```cpp
void test_optional_view_arrow() {
    const char* p;
    p = std::optional<std::string_view>()->data();
    (void)*p;
}
```



https://github.com/llvm/llvm-project/pull/184725
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to