File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 55private import rust
66private import codeql.rust.elements.internal.generated.ParentChild
77
8- query predicate multipleToString ( Element e , string s ) {
9- s = strictconcat ( e .toString ( ) , "," ) and
8+ /**
9+ * Holds if `e` has more than one `toString()` result.
10+ */
11+ query predicate multipleToStrings ( Element e , string s ) {
12+ s = strictconcat ( e .toString ( ) , ", " ) and
1013 strictcount ( e .toString ( ) ) > 1
1114}
1215
16+ /**
17+ * Holds if `e` has more than one `Location`.
18+ */
1319query predicate multipleLocations ( Locatable e ) { strictcount ( e .getLocation ( ) ) > 1 }
1420
21+ /**
22+ * Holds if `e` has more than one `getPrimaryQlClasses()` result.
23+ */
1524query predicate multiplePrimaryQlClasses ( Element e , string s ) {
16- s = e .getPrimaryQlClasses ( ) and
25+ s = strictconcat ( e .getPrimaryQlClasses ( ) , ", " ) and
1726 strictcount ( e .getAPrimaryQlClass ( ) ) > 1
1827}
1928
2029private Element getParent ( Element child ) { child = getChildAndAccessor ( result , _, _) }
2130
31+ /**
32+ * Holds if `child` has more than one AST parent.
33+ */
2234query predicate multipleParents ( Element child , Element parent ) {
2335 parent = getParent ( child ) and
2436 strictcount ( getParent ( child ) ) > 1
You can’t perform that action at this time.
0 commit comments