зеркало из https://github.com/github/codeql.git
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`.
This commit is contained in:
Родитель
8ffa124bf9
Коммит
9fc27e9130
|
@ -223,7 +223,7 @@ private predicate lvalueMayEscapeMutablyAt(Expr e) {
|
|||
lvalueMayEscapeAt(e) and
|
||||
// A qualifier of a call to a const member function is converted to a const
|
||||
// class type.
|
||||
not e.isConstant()
|
||||
not e.getType().isConst()
|
||||
}
|
||||
|
||||
private predicate addressFromVariableAccess(VariableAccess va, Expr e) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче