Unverified Commit 1b6b4d6a authored by Qizhi Hu's avatar Qizhi Hu Committed by GitHub
Browse files

[analyzer] Loop should contain CXXForRangeStmt (#70190)



Static analyze can't report diagnose when statement after a
CXXForRangeStmt and enable widen, because
`ExprEngine::processCFGBlockEntrance` lacks of CXXForRangeStmt and when
`AMgr.options.maxBlockVisitOnPath - 1` equals to `blockCount`, it can't
widen. After next iteration, `BlockCount >=
AMgr.options.maxBlockVisitOnPath` holds and generate a sink node. Add
`CXXForRangeStmt` makes it work.

Co-authored-by: default avatarhuqizhi <836744285@qq.com>
parent 6282b745
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment