mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-22 04:13: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['s'] = [ 'substitute' , 'Substitute values for loop max values', 1 ]
|
||||||
options['r'] = [ 'no_directives', 'Ignore compiler directives !DEC$ and !DIR$', 0 ]
|
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['n'] = [ 'inline' , 'all|providers|builders : Force inlining of providers or builders', 1 ]
|
||||||
|
options['u'] = [ 'unused' , 'Print unused providers', 0 ]
|
||||||
|
|
||||||
class CommandLine(object):
|
class CommandLine(object):
|
||||||
|
|
||||||
|
@ -618,6 +618,8 @@ class Variable(object):
|
|||||||
from variables import variables
|
from variables import variables
|
||||||
if '_needed_by' not in self.__dict__:
|
if '_needed_by' not in self.__dict__:
|
||||||
import parsed_text
|
import parsed_text
|
||||||
|
if command_line.do_unused and self.needed_by == []:
|
||||||
|
error.warn(None, "Provider %s is not used"%self.name)
|
||||||
result = []
|
result = []
|
||||||
for x in self.needed_by:
|
for x in self.needed_by:
|
||||||
result.append(x)
|
result.append(x)
|
||||||
|
Loading…
Reference in New Issue
Block a user