We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60ddfaa commit fc33738Copy full SHA for fc33738
1 file changed
cpp/misra/src/rules/RULE-8-7-1/PointerArithmeticFormsAnInvalidPointer.ql
@@ -230,9 +230,9 @@ newtype TPointerFormation =
230
* int *third_pos = &arr[2]; // current offset is 2.
231
* int *one_beyond_last = third_pos + 2; // current offset is 4 (which is just one beyond the last).
232
* ```
233
- *
234
- * &
235
+ *
+ * We want `&arr[2]` to be recognized as an offset of 2 applied to the base pointer of `arr`.
236
* c.f. `TAddressOfIndex` branch of `PointerFormation`.
237
*/
238
0 commit comments