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.
2 parents 9b07782 + 026abae commit 48460e3Copy full SHA for 48460e3
cpp/ql/src/semmle/code/cpp/dataflow/EscapesTree.qll
@@ -212,14 +212,9 @@ private predicate addressMayEscapeAt(Expr e) {
212
213
private predicate addressMayEscapeMutablyAt(Expr e) {
214
addressMayEscapeAt(e) and
215
- exists(Type t | t = e.getType().getUnderlyingType() |
216
- exists(PointerType pt |
217
- pt = t
218
- or
219
- pt = t.(SpecifiedType).getBaseType()
220
- |
221
- not pt.getBaseType().isConst()
222
- )
+ exists(Type t | t = e.getType().stripTopLevelSpecifiers() |
+ t instanceof PointerType and
+ not t.(PointerType).getBaseType().isConst()
223
or
224
t instanceof ReferenceType and
225
not t.(ReferenceType).getBaseType().isConst()
0 commit comments