Commit fe03a82
Move `mark()` call to before `__attribute_decl_seq()` in
`GNUCSourceParser.consumePointerOperators()` so that when no pointer
operator follows an attribute, `backup(mark)` correctly restores the
token stream to before the attribute. Previously, the mark was set
*after* consuming the attribute, so the attribute was permanently lost.
Also update `startOffset` to use `last.getOffset()` (the offset of the
`*` token) instead of `mark.getOffset()` to preserve correct pointer
operator location information.
Agent-Logs-Url: https://github.com/emmtrix/cdt/sessions/64cb901c-b4db-40ca-bc5e-49f7c8ae83a2
Co-authored-by: strimo378 <59825937+strimo378@users.noreply.github.com>
1 parent acd4556 commit fe03a82
2 files changed
Lines changed: 18 additions & 2 deletions
File tree
- core
- org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2
- org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
645 | 660 | | |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
| 872 | + | |
| 873 | + | |
872 | 874 | | |
873 | 875 | | |
874 | 876 | | |
875 | | - | |
876 | 877 | | |
877 | 878 | | |
878 | 879 | | |
| |||
883 | 884 | | |
884 | 885 | | |
885 | 886 | | |
886 | | - | |
| 887 | + | |
887 | 888 | | |
888 | 889 | | |
889 | 890 | | |
| |||
0 commit comments