[clang] [clang][Sema] Fix crash introduced in b2cd9db589335d5885c04df83003a623cf2f05ff (PR #66954)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 20 14:34:35 PDT 2023
================
@@ -228,9 +228,12 @@ calculateConstraintSatisfaction(Sema &S, const Expr *ConstraintExpr,
// The following code removes the irrelevant diagnostic information.
// FIXME: We should probably delay the addition of diagnostic information
// until we know the entire expression is false.
- if (BO.isOr() && IsRHSSatisfied)
+ if (BO.isOr() && IsRHSSatisfied) {
+ auto EffectiveDetailEnd =
+ Satisfaction.Details.begin() + EffectiveDetailEndIndex;
----------------
erichkeane wrote:
```suggestion
std::advance(Satisfaction.Details.begin(), EffectiveDetailEndIndex);
```
https://github.com/llvm/llvm-project/pull/66954
More information about the cfe-commits
mailing list