Mark Infer false positives in unit-json_view_image

Infer 1.3.0 reports NULLPTR_DEREFERENCE for passing a freshly parsed document to check_round_trip(). Suppress it on those two lines, as develop does for its own Infer false positives (#5750).

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2026-10-02 11:44:55 +02:00
parent 4068a5a4d8
commit 268ef063d3
+4
View File
@@ -169,7 +169,11 @@ TEST_CASE("json_view images: round trips")
})
{
CAPTURE(text);
// false positive: parse() returns a document with a root
// @infer-ignore NULLPTR_DEREFERENCE
check_round_trip(json_document::parse(text));
// false positive: parse() returns a document with a root
// @infer-ignore NULLPTR_DEREFERENCE
check_round_trip(ordered_json_document::parse(text));
}
}