[clang-tools-extra] [clang-tidy] Add `bugprone-errno-comparison` check (PR #210548)

via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 19 04:57:45 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE LINT COMMENT: clang-tidy-->


:warning: C/C++ code linter, clang-tidy found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

```bash

git diff -U0 origin/main...HEAD -- clang-tools-extra/clang-tidy/bugprone/ErrnoComparisonCheck.cpp clang-tools-extra/clang-tidy/bugprone/ErrnoComparisonCheck.h clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp |
python3 clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py   -path build -p1 -quiet
```

</details>

<details>
<summary>
View the output from clang-tidy here.
</summary>

```

clang-tools-extra/clang-tidy/bugprone/ErrnoComparisonCheck.cpp:42:5: warning: variable 'Loc' of type 'SourceLocation' can be declared 'const' [misc-const-correctness]
   42 |     SourceLocation Loc = E->getBeginLoc();
      |     ^
      |                    const
```

</details>


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


More information about the cfe-commits mailing list