Commit 4f7c3fa
Christian Parpart
[tests] Guard prefetch GUID optional access for clang-tidy
The block-prefetch GUID test dereferenced the TryParse result after a Catch2
REQUIRE, which clang-tidy's bugprone-unchecked-optional-access does not track as
a guard (-warnings-as-errors). Add an explicit `if (has_value())` so the optional
access is statically checked while keeping the REQUIRE as the failure signal.
Signed-off-by: Christian Parpart <c.parpart@lastrada.net>1 parent 50281ed commit 4f7c3fa
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
| 517 | + | |
| 518 | + | |
518 | 519 | | |
519 | 520 | | |
520 | 521 | | |
| |||
0 commit comments