[clang-tools-extra] [NFC] [clang-tidy] [doc] document gtest support of statusor check (PR #180662)

Florian Mayer via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 10 09:52:42 PST 2026


================
@@ -104,6 +104,46 @@ is ok. For example:
      use(*x);
    }
 
+Ensuring that the status is ok using googletest macros
+------------------------------------------------------
+
+The check is aware of ``googletest`` (or ``gtest``) macros and matchers.
+Accessing the value of a ``StatusOr<T>`` object is considered safe if it
+is preceded by an ``ASSERT_`` macro that ensures the status is ok.
+For example
----------------
fmayer wrote:

done

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


More information about the cfe-commits mailing list