Commit 9c1e757
authored
Fix #14629 syntaxError when not/compl is used as identifiers (C) (danmar#8384)
Fix false syntaxError when C alternative tokens (`not`/`compl`) are used
as identifiers (parameters)
**Minimal Example**
```
static void foo(int not, int test)
{
test = not;
}
```
**Solution**
Add C-mode declaration guard to the not/compl branch in
`simplifyCAlternativeTokens()` and extend both guards to cover
last-parameter position.1 parent e2de428 commit 9c1e757
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7819 | 7819 | | |
7820 | 7820 | | |
7821 | 7821 | | |
7822 | | - | |
| 7822 | + | |
7823 | 7823 | | |
7824 | 7824 | | |
7825 | 7825 | | |
| |||
7837 | 7837 | | |
7838 | 7838 | | |
7839 | 7839 | | |
| 7840 | + | |
| 7841 | + | |
| 7842 | + | |
| 7843 | + | |
7840 | 7844 | | |
7841 | 7845 | | |
7842 | 7846 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5450 | 5450 | | |
5451 | 5451 | | |
5452 | 5452 | | |
| 5453 | + | |
| 5454 | + | |
| 5455 | + | |
| 5456 | + | |
| 5457 | + | |
| 5458 | + | |
| 5459 | + | |
| 5460 | + | |
| 5461 | + | |
| 5462 | + | |
| 5463 | + | |
| 5464 | + | |
| 5465 | + | |
| 5466 | + | |
5453 | 5467 | | |
5454 | 5468 | | |
5455 | 5469 | | |
| |||
0 commit comments