Standardize and simplify static_assert usage#444
Merged
qdeslandes merged 2 commits intofacebook:mainfrom Feb 27, 2026
Merged
Conversation
|
Claude: review of facebook/bpfilter #444 (b5a70bb) Must fix
Suggestions
Nits
|
3334a66 to
b36d3e6
Compare
qdeslandes
requested changes
Feb 27, 2026
Contributor
qdeslandes
left a comment
There was a problem hiding this comment.
Could you also fix the static_assert in matcher.c which do not have any message? It raises a warning during the build.
b36d3e6 to
64a2896
Compare
64a2896 to
ad72e2a
Compare
static_assert usage
1000d99 to
b5a70bb
Compare
yaakov-stein
commented
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some cleanup: the docs recommend
static_assert()and that is what is used the most throughout the repo. Let's update the style for the few cases that don't usestatic_assert()currently. We'll also cleanup somestatic_assert's that didn't have a message and were causing warnings during the build.Also, we use
static_assert_enum_mappingwhere appropriate and remove instances that were unnecessary.