Skip to content

clang-tidy: enable more checks, fix fallouts#20794

Closed
vszakats wants to merge 22 commits into
curl:masterfrom
vszakats:clangtidymore2
Closed

clang-tidy: enable more checks, fix fallouts#20794
vszakats wants to merge 22 commits into
curl:masterfrom
vszakats:clangtidymore2

Conversation

@vszakats
Copy link
Copy Markdown
Member

@vszakats vszakats commented Mar 3, 2026

  • enable three checks:
    • bugprone-invalid-enum-default-initialization
    • bugprone-sizeof-expression
    • readability-inconsistent-declaration-parameter-name (strict)
  • fix remaining discrepancies with arg names in prototypes
    and implementation, in strict mode.
  • document reason for some checks tested but not enabled.

@vszakats vszakats marked this pull request as draft March 4, 2026 04:01
@vszakats vszakats changed the title [TEST] clang-tidy: try more checks [WIP] clang-tidy: try more checks Mar 9, 2026
@vszakats vszakats force-pushed the clangtidymore2 branch 3 times, most recently from 326112f to cddcdee Compare April 7, 2026 13:48
vszakats added a commit that referenced this pull request Apr 7, 2026
Also enable check in clang-tidy.

Cherry-picked from #20794

Closes #21256
@vszakats vszakats marked this pull request as ready for review April 11, 2026 00:22
@vszakats vszakats changed the title [WIP] clang-tidy: try more checks clang-tidy: enable more checks, fix fallouts Apr 11, 2026
vszakats added 14 commits April 14, 2026 01:23
```
/home/runner/work/curl/curl/lib/cf-socket.c:1597:52: error: operator has equivalent nested operands [misc-redundant-expression,-warnings-as-errors]
 1597 |   pfd[0].events = POLLRDNORM | POLLIN | POLLRDBAND | POLLPRI;
      |                                                    ^
631 warnings generated.
```
https://github.com/curl/curl/actions/runs/22603450627/job/65490313441?pr=20794
@vszakats vszakats closed this in df60148 Apr 14, 2026
@vszakats vszakats deleted the clangtidymore2 branch April 14, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant