fix: missing evaluate with '-include'
commit89c9374c08e6c2520828f3bdd73603314852eded
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Sun, 17 Sep 2017 10:05:52 +0000 (17 12:05 +0200)
committerChristopher Li <sparse@chrisli.org>
Wed, 14 Feb 2018 17:49:30 +0000 (14 12:49 -0500)
treeb7fdff9133af9e7944c0418caf43898abd8a5df5
parent1bb9f3af1a960745f00dfd8df0412fd0f5c174ca
fix: missing evaluate with '-include'

Symbols declared or defined in files directly or indirectly
given in the command line and thus processed via sparse()
are always automatically evaluated.
Symbols processed via sparse_initialize(), thus the predefined
ones, are not systematically evaluated, which is normaly fine
as they are just declarations and will be evaluated when needed.

However, if the command line include a file via '-include <file>',
the symbols of this file will also not be evaluated, which is still
fine as long as it's only definitions. But, in the rare and odd cases
where the file should contains a function definition, this function
will not be evaluated and it's expansion and linearization won't happen
as it should have.

Fix this by evaluating the symbols issued from sparse_intialize()
like it is done for sparse().

Reported-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Christopher Li <sparse@chrisli.org>
lib.c
validation/include-eval.c