[clang-tidy][NFC] Fix doc typo for bugprone-unchecked-optional-access

This commit is contained in:
Yitzhak Mandelbaum 2022-05-06 19:23:15 +00:00
parent 945fa672c6
commit ec34de1bfe
1 changed files with 2 additions and 0 deletions

View File

@ -81,6 +81,8 @@ Rely on invariants of uncommon APIs
The check is unaware of invariants of uncommon APIs. For example:
.. code-block:: c++
void f(Foo foo) {
if (foo.HasProperty("bar")) {
use(*foo.GetProperty("bar")); // unsafe: it is unclear whether `foo.GetProperty("bar")` has a value.