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
|
@emph{unless} another duplicate symbol of the
|
||||||
same@tie{}@code{@@name} is found with a different @code{@@src},
|
same@tie{}@code{@@name} is found with a different @code{@@src},
|
||||||
in which case all symbols will be returned.
|
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
|
This allows sloppy comparison on concatenated symbol tables before
|
||||||
tidying it up.
|
tidying it up.
|
||||||
|
|
||||||
|
@ -93,6 +95,10 @@
|
||||||
|
|
||||||
<sequence select="if ( count( $srcs ) gt 1 ) then
|
<sequence select="if ( count( $srcs ) gt 1 ) then
|
||||||
current-group()
|
current-group()
|
||||||
|
else
|
||||||
|
if ( ( $srcs[ 1 ] = '.' )
|
||||||
|
and ( count( current-group() ) gt 1 ) ) then
|
||||||
|
current-group()
|
||||||
else
|
else
|
||||||
()" />
|
()" />
|
||||||
</for-each-group>
|
</for-each-group>
|
||||||
|
|
|
@ -74,12 +74,20 @@
|
||||||
symbol -->
|
symbol -->
|
||||||
<preproc:sym name="no-src" />
|
<preproc:sym name="no-src" />
|
||||||
|
|
||||||
<!-- same package, no @src -->
|
<!-- same package, no @src, no duplicate -->
|
||||||
<preproc:sym name="no-src-local"
|
<preproc:sym name="no-src-local-a"
|
||||||
foo:uniq="a" />
|
foo:uniq="a" />
|
||||||
<preproc:sym name="no-src-local"
|
<preproc:sym name="no-src-local-b"
|
||||||
foo:uniq="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 -->
|
<!-- so it should be considered in determining a duplicate -->
|
||||||
<preproc:sym name="no-src-dup"
|
<preproc:sym name="no-src-dup"
|
||||||
foo:uniq="a"
|
foo:uniq="a"
|
||||||
|
|
Loading…
Reference in New Issue