[llvm-branch-commits] [NFC] [FlowSensitive] [StatusOr] Add test for pointer receivers (PR #180077)

Jan Voung via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Feb 6 10:24:10 PST 2026


================
@@ -1927,6 +1927,126 @@ TEST_P(UncheckedStatusOrAccessModelTest, QcheckNeMacro) {
   )cc");
 }
 
+TEST_P(UncheckedStatusOrAccessModelTest, Member) {
+  // The following examples are not sound as there could be member calls between
----------------
jvoung wrote:

Interesting, does the StatusOr checker no clear state on non-const member calls (as a heuristic)?

In the optional checker it does https://github.com/llvm/llvm-project/blob/823799d9ed604e8db0d22904f22c0705bf2cab67/clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp#L962

Though I think is also one of the more confusing parts for users (sometimes hard to spot which is the non-const method, and there is no explanation in the diagnostic about the reasoning).

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


More information about the llvm-branch-commits mailing list