[ADT] Compute end() after removal in llvm::erase and llvm::erase_if #243189
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.28) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.28 · 53 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.239
Real PR Conversation Timeline
1 item
"Review active on #243189"
general
weight: 0.35
kuhar
dpaoliello
Per the C++ Standard,
std::removemay leave unspecified values in the removed tail. Visual Studio 2026's vectorized implementation on ARM64 clears a removed singleton pointer, causingTinyPtrVectorto become empty and changing itsend().Since the call to the container's
erase()used bothstd::removeandend()for different arguments, there was no guarantee which order they will be evaluated. The fix is to split the call tostd::removeinto its own statement, guaranteeing that it will be evaluated before the call toend().Fixes <https://github.com/rust-lang/rust/issues/165953>