← Back to Pull requests

[ADT] Compute end() after removal in llvm::erase and llvm::erase_if #243189

Merged
dpaoliello merged 2 files (53 lines) on Nov 20, 2026 16:38 UTC
View on GitHub
dpaoliello dpaoliello commented on Nov 16, 2026 18:37 UTC
Author

Per the C++ Standard, std::remove may leave unspecified values in the removed tail. Visual Studio 2026's vectorized implementation on ARM64 clears a removed singleton pointer, causing TinyPtrVector to become empty and changing its end().

Since the call to the container's erase() used both std::remove and end() for different arguments, there was no guarantee which order they will be evaluated. The fix is to split the call to std::remove into its own statement, guaranteeing that it will be evaluated before the call to end().

Fixes <https://github.com/rust-lang/rust/issues/165953>

Diff: 53 lines (+48 / -5) across 2 files Reviewer: kuhar Review duration: 5640m
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
0.28
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
46%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Reviewers
Assignees
dpaoliello dpaoliello
Labels
risk: low confidence: 46.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 28.3% (LOW) · Higher = larger blast radius
28.3%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 46.7% · Lower = rushed or shallow review
46.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.1% · Safe to merge
15.1%