Skip to content

Convert assert() to static_assert() where feasible (#2492) - #2504

Merged
yadij merged 3 commits into
squid-cache:v7from
squidadm:v7-backport-pr2492
Sep 29, 2026
Merged

yadij merged 3 commits into
squid-cache:v7from
squidadm:v7-backport-pr2492

Conversation

@squidadm

Copy link
Copy Markdown
Collaborator

This change covers all known cases where such conversion is a good idea
and does not require other code changes. Clang-tidy misc-static-assert
tool that detects assert() conditions that can be computed at compile
time does not detect any additional candidates except assert(false)
and similar unreachable code markers.

This change covers all known cases where such conversion is a good idea
and does not require other code changes. Clang-tidy `misc-static-assert`
tool that detects `assert()` conditions that can be computed at compile
time does not detect any additional candidates except `assert(false)`
and similar unreachable code markers.
@yadij
yadij merged commit 0f0bd82 into squid-cache:v7 Sep 29, 2026
10 of 11 checks passed
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