Skip to content

Commit 9ddf8b4

Browse files
committed
Java: Add missing deprecated annotations.
1 parent 4a58a01 commit 9ddf8b4

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

java/ql/lib/semmle/code/java/dataflow/SSA.qll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ VarRead ssaGetAFirstUse(SsaDefinition def) { firstUse(def, result) }
193193
*
194194
* An SSA variable.
195195
*/
196-
class SsaVariable extends Definition {
196+
deprecated class SsaVariable extends Definition {
197197
/** Gets the SSA source variable underlying this SSA variable. */
198198
SsaSourceVariable getSourceVariable() { result = super.getSourceVariable() }
199199

@@ -203,7 +203,7 @@ class SsaVariable extends Definition {
203203
* Gets the `ControlFlowNode` at which this SSA variable is defined.
204204
*/
205205
pragma[nomagic]
206-
ControlFlowNode getCfgNode() {
206+
deprecated ControlFlowNode getCfgNode() {
207207
exists(BasicBlock bb, int i |
208208
this.definesAt(_, bb, i) and
209209
// phi nodes are inserted at position `-1`
@@ -225,7 +225,7 @@ class SsaVariable extends Definition {
225225
*
226226
* Gets an access of this SSA variable.
227227
*/
228-
VarRead getAUse() { result = getAUse(this) }
228+
deprecated VarRead getAUse() { result = getAUse(this) }
229229

230230
/**
231231
* DEPRECATED: Use `ssaGetAFirstUse(SsaDefinition)` instead.
@@ -272,7 +272,7 @@ class SsaVariable extends Definition {
272272
*
273273
* An SSA variable that either explicitly or implicitly updates the variable.
274274
*/
275-
class SsaUpdate extends SsaVariable instanceof WriteDefinition {
275+
deprecated class SsaUpdate extends SsaVariable instanceof WriteDefinition {
276276
SsaUpdate() { not this instanceof SsaImplicitInit }
277277
}
278278

@@ -281,7 +281,7 @@ class SsaUpdate extends SsaVariable instanceof WriteDefinition {
281281
*
282282
* An SSA variable that is defined by a `VariableUpdate`.
283283
*/
284-
class SsaExplicitUpdate extends SsaUpdate {
284+
deprecated class SsaExplicitUpdate extends SsaUpdate {
285285
private VariableUpdate upd;
286286

287287
SsaExplicitUpdate() { ssaExplicitUpdate(this, upd) }
@@ -409,7 +409,7 @@ deprecated class SsaUncertainImplicitUpdate extends SsaImplicitUpdate {
409409
* An SSA variable that is defined by its initial value in the callable. This
410410
* includes initial values of parameters, fields, and closure variables.
411411
*/
412-
class SsaImplicitInit extends SsaVariable instanceof WriteDefinition {
412+
deprecated class SsaImplicitInit extends SsaVariable instanceof WriteDefinition {
413413
SsaImplicitInit() { ssaImplicitInit(this) }
414414

415415
override string toString() { result = "SSA init(" + this.getSourceVariable() + ")" }
@@ -422,7 +422,7 @@ class SsaImplicitInit extends SsaVariable instanceof WriteDefinition {
422422
*
423423
* Holds if the SSA variable is a parameter defined by its initial value in the callable.
424424
*/
425-
predicate isParameterDefinition(Parameter p) {
425+
deprecated predicate isParameterDefinition(Parameter p) {
426426
this.getSourceVariable() = TLocalVar(p.getCallable(), p) and
427427
p.getCallable().getBody().getControlFlowNode() = this.getCfgNode()
428428
}

java/ql/lib/semmle/code/java/dataflow/internal/SsaImpl.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ final class UncertainWriteDefinition = Impl::UncertainWriteDefinition;
244244

245245
final class PhiNode = Impl::PhiNode;
246246

247-
predicate ssaExplicitUpdate(SsaUpdate def, VariableUpdate upd) {
247+
deprecated predicate ssaExplicitUpdate(SsaUpdate def, VariableUpdate upd) {
248248
exists(SsaSourceVariable v, BasicBlock bb, int i |
249249
def.definesAt(v, bb, i) and
250250
certainVariableUpdate(v, upd.getControlFlowNode(), bb, i) and
@@ -259,7 +259,7 @@ deprecated predicate ssaUncertainImplicitUpdate(SsaImplicitUpdate def) {
259259
)
260260
}
261261

262-
predicate ssaImplicitInit(WriteDefinition def) {
262+
deprecated predicate ssaImplicitInit(WriteDefinition def) {
263263
exists(SsaSourceVariable v, BasicBlock bb, int i |
264264
def.definesAt(v, bb, i) and
265265
hasEntryDef(v, bb) and
@@ -275,15 +275,15 @@ deprecated predicate ssaDefReachesUncertainDef(TrackedSsaDef def, SsaUncertainIm
275275
Impl::uncertainWriteDefinitionInput(redef, def)
276276
}
277277

278-
VarRead getAUse(Definition def) {
278+
deprecated VarRead getAUse(Definition def) {
279279
exists(SsaSourceVariable v, BasicBlock bb, int i |
280280
Impl::ssaDefReachesRead(v, def, bb, i) and
281281
result.getControlFlowNode() = bb.getNode(i) and
282282
result = v.getAnAccess()
283283
)
284284
}
285285

286-
predicate ssaDefReachesEndOfBlock(BasicBlock bb, Definition def) {
286+
deprecated predicate ssaDefReachesEndOfBlock(BasicBlock bb, Definition def) {
287287
Impl::ssaDefReachesEndOfBlock(bb, def, _)
288288
}
289289

0 commit comments

Comments
 (0)