@@ -218,20 +218,17 @@ class ClassAggregateLiteral extends AggregateLiteral {
218218
219219 /**
220220 * Holds if the `position`-th initialization of `field` in this aggregate initializer
221- * uses a designator (e.g., `.x =`, `[42] = `) rather than a positional initializer.
221+ * uses a designated (e.g., `.x = ... `) rather than a positional initializer.
222222 *
223- * This can be used to distinguish explicitly designated initializations from
224- * implicit positional ones.
225- *
226- * For example, in the initializer:
223+ * For example, in:
227224 * ```c
228225 * struct S { int x, y; };
229226 * struct S s = { .x = 1, 2 };
230227 * ```
231- * - `.x = 1` is a designator init , therefore `isDesignatorInit (x, 0)` holds.
232- * - `2` is a positional init for `.y`, therefore `isDesignatorInit (y, 1)` does ** not** hold.
228+ * - `.x = 1` is a designated initializer , therefore `hasDesignator (x, 0)` holds.
229+ * - `2` is a positional initializer for `s .y`, therefore `hasDesignator (y, 1)` does not hold.
233230 */
234- predicate isDesignatorInit ( Field field , int position ) {
231+ predicate hasDesignator ( Field field , int position ) {
235232 field = classType .getAField ( ) and
236233 aggregate_field_init ( underlyingElement ( this ) , _, unresolveElement ( field ) , position , true )
237234 }
@@ -330,17 +327,17 @@ class ArrayOrVectorAggregateLiteral extends AggregateLiteral {
330327
331328 /**
332329 * Holds if the `position`-th initialization of the array element at `elementIndex`
333- * in this aggregate initializer uses a designator (e.g., `[0] = ...`) rather than
334- * an implicit positional initializer.
330+ * in this aggregate initializer uses a designated (e.g., `[0] = ...`) rather than
331+ * a positional initializer.
335332 *
336333 * For example, in:
337334 * ```c
338335 * int x[] = { [0] = 1, 2 };
339336 * ```
340- * - `[0] = 1` is a designator init , therefore `isDesignatorInit (0, 0)` holds.
341- * - `2` is a positional init for `x[1]`, therefore `isDesignatorInit (1, 1)` does ** not** hold.
337+ * - `[0] = 1` is a designated initializer , therefore `hasDesignator (0, 0)` holds.
338+ * - `2` is a positional initializer for `x[1]`, therefore `hasDesignator (1, 1)` does not hold.
342339 */
343- predicate isDesignatorInit ( int elementIndex , int position ) {
340+ predicate hasDesignator ( int elementIndex , int position ) {
344341 aggregate_array_init ( underlyingElement ( this ) , _, elementIndex , position , true )
345342 }
346343
0 commit comments