[clang] Avoid accessing unset optional, workaround for #100095 (PR #100408)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 15:49:26 PDT 2024


mizvekov wrote:

I don't believe we currently have any code coverage at all for the line affected.

So with this change, which we don't fully understand, we could be breaking currently working code, and we could not even be fixing the known broken cases, as there could be further UB down the line.

I wouldn't object this patch, if we don't have other means of figuring this out soon.
But I'd like to try first getting a workaround implemented in libc++, I think that would be preferable.
If we don't get an answer about this soon, sure I'd say let's go ahead.

But in that case, I'd like to see at least a test added to this PR.

https://github.com/llvm/llvm-project/pull/100408


More information about the cfe-commits mailing list