PetScan::extract(Decl *): check that declaration is a variable declaration
The method assumes that its argument is a variable declaration, without
checking that this is really the case.
In fact, the method may get called on other kinds of declarations.
In particular, if the type of a variable is declared together with
that variable, then this type declaration appears as a separate
declaration in the corresponding DeclStmt.
Check that the argument is indeed a variable declaration and fail if it is not.
This means that the kind of variable declaration described above is
currently not allowed.
Reported-by: Michael Kruse <MichaelKruse@meinersbur.de>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>