================ @@ -2158,8 +2158,10 @@ StmtResult Parser::ParseForStatement(SourceLocation *TrailingElseLoc) { // for-range-declaration next. bool MightBeForRangeStmt = !ForRangeInfo.ParsedForRangeDecl(); ColonProtectionRAIIObject ColonProtection(*this, MightBeForRangeStmt); + SourceLocation SecondPartStart = Tok.getLocation(); + Sema::ConditionKind CK = Sema::ConditionKind::Boolean; SecondPart = ParseCXXCondition( - nullptr, ForLoc, Sema::ConditionKind::Boolean, + nullptr, ForLoc, CK, // FIXME: recovery if we don't see another semi! /*MissingOK=*/true, MightBeForRangeStmt ? &ForRangeInfo : nullptr, /*EnterForConditionScope*/ true); ---------------- shafik wrote:
```suggestion /*InitStmt=*/nullptr, ForLoc, CK, // FIXME: recovery if we don't see another semi! /*MissingOK=*/true, MightBeForRangeStmt ? &ForRangeInfo : nullptr, /*EnterForConditionScope=*/true); ``` https://github.com/llvm/llvm-project/pull/65381 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits