Skip to content

Commit 9874d40

Browse files
committed
C++: Make 'getAddressOperand' available on 'DefImpl'.
1 parent 044ee9b commit 9874d40

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,17 @@ abstract class DefImpl extends DefOrUseImpl {
256256

257257
override string toString() { result = "Def of " + this.getSourceVariable() }
258258

259+
/** Gets the indirection of this definition. */
259260
abstract int getIndirection();
260261

262+
/** Holds if this definition is guaranteed to overwrite the entire destination allocation. */
261263
abstract predicate isCertain();
262264

265+
/** Gets the value stored by this definition (i.e., the "right-hand side", if any. */
263266
abstract Node0Impl getValue();
267+
268+
/** Gets the operand representing the destination address of this definition, if any. */
269+
Operand getAddressOperand() { none() }
264270
}
265271

266272
/** An initial definition of an `IRVariable`'s address. */
@@ -303,7 +309,7 @@ abstract private class OperandBasedDef extends DefImpl {
303309
bindingset[ind]
304310
OperandBasedDef() { any() }
305311

306-
Operand getAddressOperand() { result = address }
312+
override Operand getAddressOperand() { result = address }
307313

308314
override Cpp::Location getLocation() { result = this.getAddressOperand().getUse().getLocation() }
309315

0 commit comments

Comments
 (0)