Merge pull request #6342 from MathiasVP/fix-fp-in-uninitialized-local

C++: Fix FP in `cpp/uninitialized-local`
This commit is contained in:
Mathias Vorreiter Pedersen
2021-07-21 14:46:57 +02:00
committed by GitHub

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 {