C++: Fix FP caused by a variable missing type information.

This commit is contained in:
Mathias Vorreiter Pedersen
2021-07-21 11:04:23 +02:00
parent 46fbb2a3cc
commit e536cecefe

View File

@@ -41,7 +41,7 @@ DeclStmt declWithNoInit(LocalVariable v) {
result.getADeclaration() = v and
not exists(v.getInitializer()) and
/* The type of the variable is not stack-allocated. */
not allocatedType(v.getType())
exists(Type t | t = v.getType() | not allocatedType(t))
}
class UninitialisedLocalReachability extends StackVariableReachability {