Skip to content

Commit 10b84ec

Browse files
authored
Remove commented-out code
1 parent a124f63 commit 10b84ec

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

c/misra/src/rules/RULE-9-4/RepeatedInitializationOfAggregateObjectElement.ql

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ int getMaxDepth(ArrayAggregateLiteral al) {
6060
else result = 1 + max(Expr child | child = al.getAnElementExpr(_) | getMaxDepth(child))
6161
}
6262

63+
// internal recursive predicate for `hasMultipleInitializerExprsForSameIndex`
6364
predicate hasMultipleInitializerExprsForSameIndexInternal(
6465
ArrayAggregateLiteral root, Expr e1, Expr e2
6566
) {
@@ -73,29 +74,6 @@ predicate hasMultipleInitializerExprsForSameIndexInternal(
7374
)
7475
}
7576

76-
// // internal recursive predicate for `hasMultipleInitializerExprsForSameIndex`
77-
// predicate hasMultipleInitializerExprsForSameIndexInternal(
78-
// ArrayAggregateLiteral al1, ArrayAggregateLiteral al2, Expr out_al1_expr, Expr out_al2_expr
79-
// ) {
80-
// exists(int shared_index, Expr al1_expr, Expr al2_expr |
81-
// // an `Expr` initializing an element of the same index in both `al1` and `al2`
82-
// shared_index = [0 .. al1.getArraySize() - 1] and
83-
// al1_expr = al1.getAnElementExpr(shared_index) and
84-
// al2_expr = al2.getAnElementExpr(shared_index) and
85-
// // but not the same `Expr`
86-
// not al1_expr = al2_expr and
87-
// (
88-
// // case A - the children are not aggregate literals
89-
// // holds if `al1` and `al2` both hold for .getElement[sharedIndex]
90-
// not al1_expr instanceof ArrayAggregateLiteral and
91-
// out_al1_expr = al1_expr and
92-
// out_al2_expr = al2_expr
93-
// or
94-
// // case B - `al1` and `al2` both have an aggregate literal child at the same index, so recurse
95-
// hasMultipleInitializerExprsForSameIndexInternal(al1_expr, al2_expr, out_al1_expr, out_al2_expr)
96-
// )
97-
// )
98-
// }
9977
/**
10078
* Holds if `expr1` and `expr2` both initialize the same array element of `root`.
10179
*/

0 commit comments

Comments
 (0)