Repository navigation
cpp: Model BDE single-element concurrent queue operations - #22584
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The Deque tryPushFront overloads are omitted from both the models and tests.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds C++ data-flow models for single-element BDE concurrent queue operations.
Changes:
- Models payload flow through
bdlcc::DequeandBoundedQueue. - Adds scalar, pointer, aggregate, move, status, and range-overload tests.
- Adds a change note and validation expectations.
File summaries
| File | Description |
|---|---|
cpp/ql/lib/ext/bdlcc.model.yml |
Defines queue flow summaries. |
cpp/ql/lib/change-notes/2026-09-14-bdlcc-models.md |
Documents the new models. |
cpp/ql/test/library-tests/dataflow/bdlcc/queues.h |
Provides test API declarations. |
cpp/ql/test/library-tests/dataflow/bdlcc/test.cpp |
Tests single-element payload flow. |
cpp/ql/test/library-tests/dataflow/bdlcc/ranges.cpp |
Verifies range-body analysis remains active. |
cpp/ql/test/library-tests/dataflow/bdlcc/flow.ql |
Configures the flow test. |
cpp/ql/test/library-tests/dataflow/bdlcc/flow.expected |
Stores the expected test output. |
cpp/ql/test/library-tests/dataflow/external-models/validatemodels.expected |
Updates model-validation expectations. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 1
- Review effort level: Balanced (auto)
Note
Copilot is running an experiment and ran this review at Balanced.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| - ["BloombergLP::bdlcc", "Deque<T>", False, "tryPushBack", "(const T &)", "", "Argument[*@0]", "Argument[-1].Element[@]", "value", "manual"] | ||
| - ["BloombergLP::bdlcc", "Deque<T>", False, "tryPushBack", "(T &&)", "", "Argument[*@0]", "Argument[-1].Element[@]", "value", "manual"] |
There was a problem hiding this comment.
i.e. we could model tryPushFront as well. I'd be happy if we do, but you have to draw a line somewhere so I'm also happy with this PR without.
geoffw0
left a comment
There was a problem hiding this comment.
Looks good to me - I'll start the CI checks.
| - ["BloombergLP::bdlcc", "Deque<T>", False, "tryPushBack", "(const T &)", "", "Argument[*@0]", "Argument[-1].Element[@]", "value", "manual"] | ||
| - ["BloombergLP::bdlcc", "Deque<T>", False, "tryPushBack", "(T &&)", "", "Argument[*@0]", "Argument[-1].Element[@]", "value", "manual"] |
There was a problem hiding this comment.
i.e. we could model tryPushFront as well. I'd be happy if we do, but you have to draw a line somewhere so I'm also happy with this PR without.
|
Ah, it looks like there's a merge conflict with |
|
@kumarak please could you fix the merge conflict with |
dd96d24 to
b58bc05
Compare
geoffw0
left a comment
There was a problem hiding this comment.
LGTM, thank you for addressing the merge issue. CI is passing and DCA is also clean.
Thank you for your contribution to CodeQL analysis! 🚀 🚀
This change models contained-value flow through single-element operations on
bdlcc::Dequeandbdlcc::BoundedQueue, including push/pop, force/try variants, reference and move inputs, output-parameter pops, and Deque return-value pops.The models preserve scalar, pointer, and aggregate payloads. Range and bulk overloads remain available for body analysis.
Tests cover payload propagation, return-value pops, status results, preservation of existing outputs on failure, and range-overload body analysis. The models capture possible payload flow without modeling queue order or operation success.