[llvm-branch-commits] [FlowSensitive] [StatusOr] [3/N] support absl::Status ops (PR #163868)
Florian Mayer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Oct 16 14:21:40 PDT 2025
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/163868
`absl::StatusOr::status` allows extraction of the status associated with
a StatusOr value. That can also be used to check whether the StatusOr
has a value or not.
This makes sure code like this is checked properly:
```cpp
int target(absl::StatusOr<int> SOR) {
if (SOR.status().ok())
return *SOR;
return 0;
}
```
More information about the llvm-branch-commits
mailing list