Skip to content

[build] Update to clang-tidy-22#6156

Merged
fhanau merged 1 commit intomainfrom
felix/022426-clang-tidy-22
Feb 25, 2026
Merged

[build] Update to clang-tidy-22#6156
fhanau merged 1 commit intomainfrom
felix/022426-clang-tidy-22

Conversation

@fhanau
Copy link
Copy Markdown
Contributor

@fhanau fhanau commented Feb 24, 2026

Adds support for readability-redundant-typename check.

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Feb 24, 2026

The changes are straightforward:

  1. build/deps/build_deps.jsonc: Bumps freeze_version from clang-tidy-21.1.4 to clang-tidy-22.1.0 for all three platforms (linux-amd64, linux-arm64, darwin-arm64).
  2. build/deps/gen/build_deps.MODULE.bazel: Autogenerated file updated with new URLs and sha256 hashes matching the new version.
  3. compile_flags.txt: Adds llvm-22 include paths ahead of the existing llvm-21 paths, maintaining the descending-version order convention.

All three platform entries are consistently updated. The compile_flags.txt correctly adds llvm-22 paths before llvm-21 (so the newer toolchain's headers are found first). The generated MODULE.bazel has distinct sha256 hashes for each platform binary, which is expected.

LGTM

github run

@fhanau fhanau force-pushed the felix/022426-clang-tidy-22 branch from 5845707 to eb74316 Compare February 24, 2026 19:15
@fhanau fhanau marked this pull request as ready for review February 24, 2026 19:22
@fhanau fhanau requested review from a team as code owners February 24, 2026 19:22
Copy link
Copy Markdown
Collaborator

@jasnell jasnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI-generated review — may contain errors.

Summary

Clean, mechanical update from clang-tidy 21.1.4 → 22.1.0. Three categories of changes:

  1. Toolchain version bump: build_deps.jsonc, build_deps.MODULE.bazel (sha256 + URLs), compile_flags.txt (llvm-22 include paths)
  2. .clang-tidy config adjustments: disable new noisy checks (-readability-redundant-parentheses), add modernize-use-string-view, move modernize-avoid-variadic-functions to TODO, note new bugprone-derived-method-shadowing-base-method for future enablement
  3. Redundant typename removal across ~28 files: C++20 (P0634R3) made typename optional in contexts where only a type is valid (using declarations, default template args, trailing return types, friend declarations). All removals are correct for C++23.

Findings

No blocking issues. Two minor observations:

  • [LOW] Pre-existing: bugprone-return-const-ref-from-parameter is both enabled (active checks) and listed in the TODO comment section.clang-tidy:16 vs .clang-tidy:68. Not introduced by this PR; just noting for future cleanup.
  • [INFO] modernize-avoid-variadic-functions demotion — moved from active checks to TODO. It might be worth a brief comment in the TODO section explaining why (new false positives in 22?) to help future readers understand the intent.

@fhanau fhanau force-pushed the felix/022426-clang-tidy-22 branch from eb74316 to c5795b0 Compare February 24, 2026 20:19
Adds support for readability-redundant-typename check
@fhanau fhanau force-pushed the felix/022426-clang-tidy-22 branch from c5795b0 to 92b3fa5 Compare February 24, 2026 21:32
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 24, 2026

Merging this PR will degrade performance by 16.21%

❌ 1 regressed benchmark
✅ 69 untouched benchmarks
⏩ 129 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
jsonResponse[Response] 40 µs 47.7 µs -16.21%

Comparing felix/022426-clang-tidy-22 (92b3fa5) with main (312f004)

Open in CodSpeed

Footnotes

  1. 129 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@fhanau fhanau merged commit 9091f5f into main Feb 25, 2026
22 of 23 checks passed
@fhanau fhanau deleted the felix/022426-clang-tidy-22 branch February 25, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants