[PATCH] D102502: [clang] Fix ternary operator in the second for loop statement
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 14 14:34:29 PDT 2021
rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clang/lib/Parse/ParseExprCXX.cpp:2036
FRI->LoopVar = Actions.ActOnDeclStmt(DG, DeclStart, Tok.getLocation());
+ assert(FRI->ColonLoc.isValid() && "cannot find for range declaration");
return Sema::ConditionResult();
----------------
If parsing failed, I don't think this assertion should be expected to hold: error recovery after the parse error might not have interpreted the `:` as the start of the range expression.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102502/new/
https://reviews.llvm.org/D102502
More information about the cfe-commits
mailing list