symtable: Detect duplicate symbols in the same package
* src/symtable.xsl (symtable:find-duplicates): Update description. Find duplicates in same package. * test/symtable.xspec: Update test case accordingly.master
parent
d284d75f39
commit
852c42e340
|
@ -63,6 +63,8 @@
|
|||
@emph{unless} another duplicate symbol of the
|
||||
same@tie{}@code{@@name} is found with a different @code{@@src},
|
||||
in which case all symbols will be returned.
|
||||
An exception to this rule is made when both symbols lack a @code{@@src},
|
||||
meaning that they are both defined in the same package.
|
||||
This allows sloppy comparison on concatenated symbol tables before
|
||||
tidying it up.
|
||||
|
||||
|
@ -94,7 +96,11 @@
|
|||
<sequence select="if ( count( $srcs ) gt 1 ) then
|
||||
current-group()
|
||||
else
|
||||
()" />
|
||||
if ( ( $srcs[ 1 ] = '.' )
|
||||
and ( count( current-group() ) gt 1 ) ) then
|
||||
current-group()
|
||||
else
|
||||
()" />
|
||||
</for-each-group>
|
||||
</function>
|
||||
|
||||
|
|
|
@ -74,12 +74,20 @@
|
|||
symbol -->
|
||||
<preproc:sym name="no-src" />
|
||||
|
||||
<!-- same package, no @src -->
|
||||
<preproc:sym name="no-src-local"
|
||||
<!-- same package, no @src, no duplicate -->
|
||||
<preproc:sym name="no-src-local-a"
|
||||
foo:uniq="a" />
|
||||
<preproc:sym name="no-src-local"
|
||||
<preproc:sym name="no-src-local-b"
|
||||
foo:uniq="b" />
|
||||
|
||||
<!-- same package, no @src, duplicate -->
|
||||
<preproc:sym name="no-src-local"
|
||||
foo:uniq="a"
|
||||
foo:dup="true" />
|
||||
<preproc:sym name="no-src-local"
|
||||
foo:uniq="b"
|
||||
foo:dup="true" />
|
||||
|
||||
<!-- so it should be considered in determining a duplicate -->
|
||||
<preproc:sym name="no-src-dup"
|
||||
foo:uniq="a"
|
||||
|
|
Loading…
Reference in New Issue