skip functions without valid scops when autodetecting
commit4d140907a0923fc9ec076a68f37a1e7a27d67a34
authorSven Verdoolaege <sven.verdoolaege@gmail.com>
Sun, 13 Jan 2019 14:40:58 +0000 (13 15:40 +0100)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Tue, 15 Jan 2019 17:39:18 +0000 (15 18:39 +0100)
tree7fbdb7736f1e17455bfc6c0e264ae5d750957ad5
parentf9e4c80ada9525539db55becdd4523f00fa002cf
skip functions without valid scops when autodetecting

When autodetecting, PetScan::scan will return a NULL pointer
when it cannot find a valid scop in a given function.
This NULL pointer gets passed to call_fn, resulting in an error
being raised and no further functions being considered,
without any feedback to the user (since autodetection turn
off diagnostics).  This is especially problematic when
an unanalyzable function appears in an included header.
Simply ignore functions without a valid scop and move on
to the next function (if any).

Reported-by: Daniel Maier <daniel.maier@tu-berlin.de>
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
pet.cc