I just tried this code with clang-tidy built from main and noticed that bugprone-unchecked-optional-access doesn't work. If I comment out the #include <iox/optional.hpp> then it works as expected.
#include <iox/optional.hpp>
#include <optional>
int foo(std::optional<int>& val)
{
return *val;
}
Verified that this doesn't work with LLVM 21.1.5 as well (i.e. the check doesn't detect the unsafe dereference)