Unverified Commit 21be8182 authored by Ryosuke Niwa's avatar Ryosuke Niwa Committed by GitHub
Browse files

[analyzer] Support determining origins in a conditional operator in WebKit checkers. (#91143)

This PR adds the support for determining the origin of a pointer in a
conditional operator.

Because such an expression can have two distinct origins each of which
needs to be visited, this PR refactors tryToFindPtrOrigin to take a
callback instead of returning a pair.

The callback is called for the second operand and the third operand of
the conditioanl operator (i.e. E2 and E3 in E1 ? E2 : E3).

Also treat nullptr and integer literal as safe pointer origins in the
local variable checker.
parent 181e2e8f
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