Skip to content

Commit b4e45ad

Browse files
committed
C++: Address review.
1 parent 7f13d4c commit b4e45ad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/ql/src/semmle/code/cpp/dataflow/EscapesTree.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ private predicate addressMayEscapeMutablyAt(Expr e) {
226226
// If we go through a temporary object step, we can take a reference to a temporary const pointer
227227
// object, where the pointer doesn't point to a const value
228228
exists(TemporaryObjectExpr temp, PointerType pt |
229-
temp.getConversion() = e and pt = temp.getType().stripTopLevelSpecifiers()
229+
temp.getConversion() = e.(ReferenceToExpr) and
230+
pt = temp.getType().stripTopLevelSpecifiers()
230231
|
231232
not pt.getBaseType().isConst()
232233
)

0 commit comments

Comments
 (0)