diff options
author | 2006-11-30 02:16:08 -0800 | |
---|---|---|
committer | 2006-12-04 18:02:12 -0800 | |
commit | 9c1b0a2fd4347f90c5813d5ed130fd814857ee3e (patch) | |
tree | 95a081212f421d8900f77e7b508c2094eb1ad33a /scope.c | |
parent | Fix warning on self check. (diff) | |
download | sparse-9c1b0a2fd4347f90c5813d5ed130fd814857ee3e.tar.gz sparse-9c1b0a2fd4347f90c5813d5ed130fd814857ee3e.tar.bz2 sparse-9c1b0a2fd4347f90c5813d5ed130fd814857ee3e.zip |
delay removing file scope
Sparse only returns the used symbol. By the time it return
the symbol, it already destroyed the file scope.
This patch preserve the file scope. The caller can
examine the unused symbols. e.g. If I want to generate
ctags base on sparse, it need those unused symbols.
Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -96,6 +96,13 @@ void end_file_scope(void) end_scope(&file_scope); } +void new_file_scope(void) +{ + if (file_scope != &builtin_scope) + end_file_scope(); + start_file_scope(); +} + void end_symbol_scope(void) { end_scope(&block_scope); |