[clang] [clang-tools-extra] [clang-tidy] Add `bugprone-unchecked-expected-access` check (PR #233219)

Valentyn Yukhymenko via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 18 04:04:32 PDT 2026


BaLiKfromUA wrote:

### Note about tests in real codebases:

1. I tested this exact implementation against my team's codebase, and the test went really well: out of ~1500 accesses to `std::expected`, it produced 12 warnings, and all of them were real issues 🎉.  Most of these issues are human errors related to copy-paste, which is _expected_, and I am happy to find them 😄 
2. I've run each test both with mock and real headers -- all good locally.
3. I've run this check against libc++ conformance tests of `std::expected` -- no crashes; all 16 warnings are expected at the current level of support.


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


More information about the cfe-commits mailing list