[clang-tools-extra] [NFC][clang-tidy] Update documentation for StatusOr check. (PR #176498)

Rohan Jacob-Rao via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 16 16:26:45 PST 2026


================
@@ -317,9 +317,9 @@ example:
 
 .. code:: cpp
 
-   void f(std::vector<absl::StatusOr<int>> sors) {
-     if (sors[0].ok()) {
-       use(*sors[0]); // unsafe: it is unclear whether the status of `sors[0]` is ok.
+   void f(std::vector<absl::StatusOr<int>> xs) {
----------------
rohanjr wrote:

Yeah, my intent was `xs` like a plural (I think this is a Haskell-ism). But since the point of https://abseil.io/tips/181 is that the variable name should not encode the type, it makes sense to use a generic `x` everywhere.

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


More information about the cfe-commits mailing list