forked from OSchip/llvm-project
[clang-tidy][NFC] Fix doc typo for bugprone-unchecked-optional-access
This commit is contained in:
parent
945fa672c6
commit
ec34de1bfe
|
@ -81,6 +81,8 @@ Rely on invariants of uncommon APIs
|
||||||
|
|
||||||
The check is unaware of invariants of uncommon APIs. For example:
|
The check is unaware of invariants of uncommon APIs. For example:
|
||||||
|
|
||||||
|
.. code-block:: c++
|
||||||
|
|
||||||
void f(Foo foo) {
|
void f(Foo foo) {
|
||||||
if (foo.HasProperty("bar")) {
|
if (foo.HasProperty("bar")) {
|
||||||
use(*foo.GetProperty("bar")); // unsafe: it is unclear whether `foo.GetProperty("bar")` has a value.
|
use(*foo.GetProperty("bar")); // unsafe: it is unclear whether `foo.GetProperty("bar")` has a value.
|
||||||
|
|
Loading…
Reference in New Issue