diff options
author | Paul Kirth <paulkirth@google.com> | 2025-03-20 14:04:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-20 14:04:58 -0700 |
commit | a87a64b2e487995f9de90a614c7caa7a888147df (patch) | |
tree | 1a387f560084591b65950e884875412b15c03838 /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | 335a4614dee4123ff4f86e6400fc6a305766e227 (diff) | |
download | llvm-a87a64b2e487995f9de90a614c7caa7a888147df.zip llvm-a87a64b2e487995f9de90a614c7caa7a888147df.tar.gz llvm-a87a64b2e487995f9de90a614c7caa7a888147df.tar.bz2 |
[clang-doc] Avoid deref of invalid std::optional (#131939)
Since our existing guard is insufficient to prevent accessing the
std::optional when in an invalid state, guard the access with
`.value_or()`. This maintains the desired behavior, without running into
UB.
The new test should prevent regressions.
Fixes #131697
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions