mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 20:03:33 +01:00
Check unused providers
This commit is contained in:
parent
2fecac9d79
commit
42c898d509
@ -47,6 +47,7 @@ options['l'] = [ 'align' , 'Align arrays using compiler directives. Sets
|
||||
options['s'] = [ 'substitute' , 'Substitute values for loop max values', 1 ]
|
||||
options['r'] = [ 'no_directives', 'Ignore compiler directives !DEC$ and !DIR$', 0 ]
|
||||
options['n'] = [ 'inline' , 'all|providers|builders : Force inlining of providers or builders', 1 ]
|
||||
options['u'] = [ 'unused' , 'Print unused providers', 0 ]
|
||||
|
||||
class CommandLine(object):
|
||||
|
||||
|
@ -618,6 +618,8 @@ class Variable(object):
|
||||
from variables import variables
|
||||
if '_needed_by' not in self.__dict__:
|
||||
import parsed_text
|
||||
if command_line.do_unused and self.needed_by == []:
|
||||
error.warn(None, "Provider %s is not used"%self.name)
|
||||
result = []
|
||||
for x in self.needed_by:
|
||||
result.append(x)
|
||||
|
Loading…
Reference in New Issue
Block a user