[clang] [clang-tools-extra] [clang-tidy] fix false positive in bugprone-unchecked-optional-access for nested loops (PR #177858)

via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 25 06:29:25 PST 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 52301 tests passed
* 916 tests skipped
* 3 tests failed

## Failed Tests
(click on a test name to see its output)

### Clang-Unit
<details>
<summary>Clang-Unit._/AllClangUnitTests_exe/UncheckedOptionalUseTestInst/UncheckedOptionalAccessTest/ConstPointerAccessor/absl</summary>

```
Script:
--
C:\_work\llvm-project\llvm-project\build\tools\clang\unittests\.\AllClangUnitTests.exe --gtest_filter=UncheckedOptionalUseTestInst/UncheckedOptionalAccessTest.ConstPointerAccessor/absl
--
C:\_work\llvm-project\llvm-project\clang\unittests\Analysis\FlowSensitive\UncheckedOptionalAccessModelTest.cpp:172
Value of: DiagnosticLines
Expected: equals {}
  Actual: { 14 }, which has these unexpected elements: 14

C:\_work\llvm-project\llvm-project\clang\unittests\Analysis\FlowSensitive\UncheckedOptionalAccessModelTest.cpp:172
Value of: DiagnosticLines
Expected: equals {}
  Actual: { 14 }, which has these unexpected elements: 14


```
</details>
<details>
<summary>Clang-Unit._/AllClangUnitTests_exe/UncheckedOptionalUseTestInst/UncheckedOptionalAccessTest/ConstPointerAccessor/base</summary>

```
Script:
--
C:\_work\llvm-project\llvm-project\build\tools\clang\unittests\.\AllClangUnitTests.exe --gtest_filter=UncheckedOptionalUseTestInst/UncheckedOptionalAccessTest.ConstPointerAccessor/base
--
C:\_work\llvm-project\llvm-project\clang\unittests\Analysis\FlowSensitive\UncheckedOptionalAccessModelTest.cpp:172
Value of: DiagnosticLines
Expected: equals {}
  Actual: { 14 }, which has these unexpected elements: 14

C:\_work\llvm-project\llvm-project\clang\unittests\Analysis\FlowSensitive\UncheckedOptionalAccessModelTest.cpp:172
Value of: DiagnosticLines
Expected: equals {}
  Actual: { 14 }, which has these unexpected elements: 14


```
</details>
<details>
<summary>Clang-Unit._/AllClangUnitTests_exe/UncheckedOptionalUseTestInst/UncheckedOptionalAccessTest/ConstPointerAccessor/std</summary>

```
Script:
--
C:\_work\llvm-project\llvm-project\build\tools\clang\unittests\.\AllClangUnitTests.exe --gtest_filter=UncheckedOptionalUseTestInst/UncheckedOptionalAccessTest.ConstPointerAccessor/std
--
C:\_work\llvm-project\llvm-project\clang\unittests\Analysis\FlowSensitive\UncheckedOptionalAccessModelTest.cpp:172
Value of: DiagnosticLines
Expected: equals {}
  Actual: { 14 }, which has these unexpected elements: 14

C:\_work\llvm-project\llvm-project\clang\unittests\Analysis\FlowSensitive\UncheckedOptionalAccessModelTest.cpp:172
Value of: DiagnosticLines
Expected: equals {}
  Actual: { 14 }, which has these unexpected elements: 14


```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the cfe-commits mailing list