Repository navigation
fix(lpc): FL_STATIC_ASSERT (not raw static_assert) in rx_sct_capture - #3538
Merged
Merged
Conversation
Regression from #3535 — the vendor CMSIS base-address identity checks used raw `static_assert(...)`. `BannedMacrosChecker` flags 5 violations: static_assert(kSysconBase == SYSCON_BASE, ...) static_assert(kSwmBase == SWM0_BASE, ...) static_assert(kInputMuxBase == INPUTMUX_BASE, ...) static_assert(kSctBase == SCT0_BASE, ...) static_assert(kDmaBase == DMA0_BASE, ...) Rationale (from the linter): `FL_STATIC_ASSERT` keeps compile-time assertions portable on old embedded toolchains. Fix: include `fl/stl/static_assert.h` and replace `static_assert` with `FL_STATIC_ASSERT` — same semantics on modern compilers, macro-based fallback on old ones. ## Verification - `bash test --cpp` — 345/345 pass - The `FL_STATIC_ASSERT`s still fire against LPC845 vendor CMSIS `<PERIPH>_BASE` macros the same way; behavior identical - `BannedMacrosChecker` should now find 0 violations in this file Refs: #3535 (introduced the regression), #3517 Phase C. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis change updates compile-time assertion checks in a single header file, replacing standard ChangesStatic Assert Migration
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Regression from #3535 — my vendor CMSIS base-address identity checks used raw
static_assert(...).BannedMacrosCheckerflags 5 violations with rationale "FL_STATIC_ASSERT keeps compile-time assertions portable on old embedded toolchains."Fix: include
fl/stl/static_assert.hand replace 5static_assertsites withFL_STATIC_ASSERT.Verification
bash test --cpp— 345/345 passFL_STATIC_ASSERTs still fire against LPC845 vendor CMSIS macros the same wayBannedMacrosCheckershould now find 0 violations in this fileRefs: #3535 (introduced), #3517 Phase C.
Summary by CodeRabbit