aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc/objc-gnu-runtime-abi-01.c
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-10-30 19:06:58 +0000
committerIain Sandoe <iain@sandoe.co.uk>2020-11-01 20:21:41 +0000
commit7a2cc1e8438ee853900f20880ca8858c17486b10 (patch)
tree2785fa67b9e3e07a913c218f55e11e26bc220e27 /gcc/objc/objc-gnu-runtime-abi-01.c
parente344ea07e4024316e1bc01f18bf7f187ad3aef89 (diff)
downloadgcc-7a2cc1e8438ee853900f20880ca8858c17486b10.zip
gcc-7a2cc1e8438ee853900f20880ca8858c17486b10.tar.gz
gcc-7a2cc1e8438ee853900f20880ca8858c17486b10.tar.bz2
Objective-C/C++ : Improve '@' keyword locations.
When we are lexing tokens for Objective-C, we combine '@' tokens with a following keyword (when that keyword is a valid Objective-C one or, for Objective-C, one of the C++ keywords that can appear in this position). The responsibility is passed on to the parser to validate the resulting combination. The combination of tokens was being done without applying the rule to their locations - so that we get: @property ^ instead of what the user might expect: @property ^~~~~~~~~ This patch combines the source range of the keyword with that of the '@' sign - which improves diagnostics. gcc/c-family/ChangeLog: * c-lex.c (c_lex_with_flags): When combining '@' with a keyword for Objective-C, combine the location ranges too.
Diffstat (limited to 'gcc/objc/objc-gnu-runtime-abi-01.c')
0 files changed, 0 insertions, 0 deletions