Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit PhanUnusedVariable for a reference if there are no uses or redefinitions #2733

Closed
TysonAndre opened this issue May 6, 2019 · 0 comments · Fixed by #2737
Closed

Emit PhanUnusedVariable for a reference if there are no uses or redefinitions #2733

TysonAndre opened this issue May 6, 2019 · 0 comments · Fixed by #2737
Labels
dead code detection Affects --dead-code-detection enhancement This improves the quality of Phan's analysis of a codebase

Comments

@TysonAndre
Copy link
Member

e.g.

function test($a) {
    $b = &$a;  // should warn since $b is not read or assigned later
    $a = 2;
    return $a;
}
@TysonAndre TysonAndre added enhancement This improves the quality of Phan's analysis of a codebase dead code detection Affects --dead-code-detection labels May 6, 2019
TysonAndre added a commit to TysonAndre/phan that referenced this issue May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dead code detection Affects --dead-code-detection enhancement This improves the quality of Phan's analysis of a codebase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant