Skip to content

Commit 324e0e8

Browse files
committed
always sort both by location and by term tostring
1 parent c89016b commit 324e0e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

shared/regex/codeql/regex/nfa/NfaUtils.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ module Make<RegexTreeViewSig TreeImpl> {
166166
min(RelevantRegExpTerm t |
167167
str = getCanonicalizationString(t)
168168
|
169-
t order by getTermLocationString(t)
169+
t order by getTermLocationString(t), t.toString()
170170
)
171171
}
172172

@@ -949,7 +949,7 @@ module Make<RegexTreeViewSig TreeImpl> {
949949
isStartState(s) and
950950
getRoot(s.getRepr()) = root
951951
|
952-
s order by getTermLocationString(s.getRepr())
952+
s order by getTermLocationString(s.getRepr()), s.getRepr().toString()
953953
)
954954
)
955955
}
@@ -1047,7 +1047,7 @@ module Make<RegexTreeViewSig TreeImpl> {
10471047
isCandidate(s, _) and
10481048
s.getRepr() instanceof InfiniteRepetitionQuantifier
10491049
|
1050-
s order by getTermLocationString(s.getRepr())
1050+
s order by getTermLocationString(s.getRepr()), s.getRepr().toString()
10511051
)
10521052
)
10531053
}

0 commit comments

Comments
 (0)