lgtm: detect more possible problematic scenarios
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sun, 5 Dec 2021 15:11:35 +0000 (16:11 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Sun, 5 Dec 2021 21:47:14 +0000 (22:47 +0100)
commitc8fec8bf9b086f9fc7638db0f1a613a00d7c63a3
tree900798ee526665bcfccc6f8b1ac8dde0e85eb8e1
parentaf1868213657b38b8d4008608976eb81546cfb8e
lgtm: detect more possible problematic scenarios

1) don't ignore stack-allocated variables, since they may hide
   heap-allocated stuff (compound types)
2) check if there's a return between the variable declaration and its
   initialization; if so, treat the variable as uninitialized
3) introduction of 2) increased the query runtime exponentially, so
   introduce some optimizations to bring it back to some reasonable
   values
.lgtm/cpp-queries/UninitializedVariableWithCleanup.ql