Skip to content

Commit 9fc27e9

Browse files
committed
C++: Fix "is constant" check
The check was supposed to check for constant type, not constant value. This fixes a false negative that appeared in `LargeParameter/test.cpp:106`.
1 parent 8ffa124 commit 9fc27e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ private predicate lvalueMayEscapeMutablyAt(Expr e) {
223223
lvalueMayEscapeAt(e) and
224224
// A qualifier of a call to a const member function is converted to a const
225225
// class type.
226-
not e.isConstant()
226+
not e.getType().isConst()
227227
}
228228

229229
private predicate addressFromVariableAccess(VariableAccess va, Expr e) {

0 commit comments

Comments
 (0)