We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f13d4c commit b4e45adCopy full SHA for b4e45ad
cpp/ql/src/semmle/code/cpp/dataflow/EscapesTree.qll
@@ -226,7 +226,8 @@ private predicate addressMayEscapeMutablyAt(Expr e) {
226
// If we go through a temporary object step, we can take a reference to a temporary const pointer
227
// object, where the pointer doesn't point to a const value
228
exists(TemporaryObjectExpr temp, PointerType pt |
229
- temp.getConversion() = e and pt = temp.getType().stripTopLevelSpecifiers()
+ temp.getConversion() = e.(ReferenceToExpr) and
230
+ pt = temp.getType().stripTopLevelSpecifiers()
231
|
232
not pt.getBaseType().isConst()
233
)
0 commit comments