Repository navigation
Commit 3565303
committed
Leave template-argument array dimensions to setArrayDimensionsUsingValueFlow
For std::array<char, 3 + sizeof(S)> a[2], dimension.tok is only the first
token of the template argument and may have no AST, so its known value was
that of 3 alone. With num set, the later pass skipped the dimension and
sizeof(a) became 3, giving a false arrayIndexOutOfBounds.1 parent 37c4492 commit 3565303
2 files changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| 439 | + | |
| 440 | + | |
439 | 441 | | |
440 | 442 | | |
441 | 443 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2064 | 2064 | | |
2065 | 2065 | | |
2066 | 2066 | | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
2067 | 2075 | | |
2068 | 2076 | | |
2069 | 2077 | | |
| |||
0 commit comments