-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Java: Add deprecation annotations in SSA #20772
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
Conversation
|
|
||
| import java | ||
| private import internal.SsaImpl | ||
| import internal.SsaImpl::Ssa as Ssa |
Check warning
Code scanning / CodeQL
Names only differing by case Warning
| private predicate upcastEnhancedForStmtAux(BaseSsaUpdate v, RefType t, RefType t1, RefType t2) { | ||
| private predicate upcastEnhancedForStmtAux( | ||
| Base::SsaExplicitWrite v, RefType t, RefType t1, RefType t2 | ||
| ) { |
Check warning
Code scanning / CodeQL
Candidate predicate not marked as `nomagic` Warning
upcastEnhancedForStmt
| i = 0 | ||
| ) | ||
| } | ||
| module Ssa = Impl::MakeSsa<SsaInput>; |
Check warning
Code scanning / CodeQL
Names only differing by case Warning
| c.getBody().getBasicBlock() = bb and | ||
| i = -1 | ||
| ) | ||
| } |
Check warning
Code scanning / CodeQL
Names only differing by case Warning
2ee324e to
9ddf8b4
Compare
9ddf8b4 to
30d68d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds deprecation annotations to SSA-related predicates and classes in the Java dataflow library as a followup to PR #20761. The changes mark various SSA predicates, classes, and methods as deprecated to guide users toward newer alternatives.
Key changes:
- Deprecated several helper predicates in
SsaImpl.qllfor SSA operations - Deprecated legacy SSA classes in
SSA.qllincludingSsaVariable,SsaUpdate,SsaExplicitUpdate, andSsaImplicitInit - Deprecated member predicates and methods within those classes
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
java/ql/lib/semmle/code/java/dataflow/internal/SsaImpl.qll |
Added deprecation annotations to predicates ssaExplicitUpdate, ssaImplicitInit, getAUse, and ssaDefReachesEndOfBlock |
java/ql/lib/semmle/code/java/dataflow/SSA.qll |
Added deprecation annotations to classes SsaVariable, SsaUpdate, SsaExplicitUpdate, and SsaImplicitInit, as well as their member predicates getCfgNode, getAUse, and isParameterDefinition |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Followup for #20761