Repository navigation
Commit e0596d3
authored
Fix #15204 FP unusedFunction with compound literal as first argument (#9015)
The check meant to skip function declarations and definitions inspected
the link of the token following the opening parenthesis, i.e. the first
argument, rather than the parenthesis itself. A call such as `f((struct
S){0})` was therefore mistaken for a definition and the call was never
recorded.1 parent fdc1942 commit e0596d3
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
279 | | - | |
| 278 | + | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
838 | 839 | | |
839 | 840 | | |
840 | 841 | | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
841 | 852 | | |
842 | 853 | | |
843 | 854 | | |
0 commit comments