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

Yitzhak Mandelbaum via cfe-commits cfe-commits at lists.llvm.org
Fri May 6 12:24:10 PDT 2022


Author: Yitzhak Mandelbaum
Date: 2022-05-06T19:23:43Z
New Revision: ec34de1bfe5501fd3017ff867bc2481dc052788d

URL: https://github.com/llvm/llvm-project/commit/ec34de1bfe5501fd3017ff867bc2481dc052788d
DIFF: https://github.com/llvm/llvm-project/commit/ec34de1bfe5501fd3017ff867bc2481dc052788d.diff

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

Added: 
    

Modified: 
    clang-tools-extra/docs/clang-tidy/checks/bugprone-unchecked-optional-access.rst

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/docs/clang-tidy/checks/bugprone-unchecked-optional-access.rst b/clang-tools-extra/docs/clang-tidy/checks/bugprone-unchecked-optional-access.rst
index 40ca8eeb7ff8..56ce90c726b2 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/bugprone-unchecked-optional-access.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/bugprone-unchecked-optional-access.rst
@@ -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.


        


More information about the cfe-commits mailing list