[clang] [clang-tools-extra] [clang-tidy] Add `IgnoreValueCalls` option to bugprone-unchecked-optional-access (PR #167209)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 9 17:54:30 PST 2025
================
@@ -351,7 +351,10 @@ Changes in existing checks
- Improved :doc:`bugprone-unchecked-optional-access
<clang-tidy/checks/bugprone/unchecked-optional-access>` check by supporting
``NullableValue::makeValue`` and ``NullableValue::makeValueInplace`` to
- prevent false-positives for ``BloombergLP::bdlb::NullableValue`` type.
+ prevent false-positives for ``BloombergLP::bdlb::NullableValue`` type, and by
+ adding the ``IgnoreValueCalls`` option to suppress diagnostics for
+ ``optional::value()`` while still diagnosing UB-prone dereferences via
+ ``operator*`` and ``operator->``.
----------------
zeyi2 wrote:
I think the `IgnoreSmartPointerDereference` was already in the codebase before and I only made some documentation change. Should I also document it?
https://github.com/llvm/llvm-project/pull/167209
More information about the cfe-commits
mailing list