Fix the issue discovered by fuzzing (https://llvm.org/bugs/show_bug.cgi?id=23057#c18) by handling nullptr in Sema::ActOnCXXForRangeDecl and correct delayed typos in for-range expression before calling Sema::ActOnCXXForRangeStmt (fixes PR26288 as well).
Details
Details
- Reviewers
kcc majnemer rsmith - Commits
- rG7d6b924df841: PR23057: Fix assertion `Val && "isa<> used on a null pointer"' on invalid for…
rC259532: PR23057: Fix assertion `Val && "isa<> used on a null pointer"' on invalid for…
rL259532: PR23057: Fix assertion `Val && "isa<> used on a null pointer"' on invalid for…
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Parse/ParseStmt.cpp | ||
---|---|---|
1719–1724 ↗ | (On Diff #46131) | Does this change effect all of the test cases you've added? If not, I think it would make sense to split this change out. |
lib/Parse/ParseStmt.cpp | ||
---|---|---|
1719–1724 ↗ | (On Diff #46131) | Yes, this change is needed in all added test cases. assert(DelayedTypos.empty() && "Uncorrected typos!"); |