diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2023-05-28 13:33:52 -0400 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-05-30 08:36:00 +0000 |
commit | 019dd7b55ff05854569bc7e271a8b695e4c27065 (patch) | |
tree | c4d29695b754de2958bab8ad4a5ca61c884682df /gcc/gimple-range-edge.cc | |
parent | 0162ff3900ae032958d16c0a4af6c76ca3dd4335 (diff) | |
download | gcc-019dd7b55ff05854569bc7e271a8b695e4c27065.zip gcc-019dd7b55ff05854569bc7e271a8b695e4c27065.tar.gz gcc-019dd7b55ff05854569bc7e271a8b695e4c27065.tar.bz2 |
Avoid invalid metavariable substitutions
gcc/rust/ChangeLog:
* expand/rust-macro-substitute-ctx.cc
(SubstituteCtx::substitute_metavar): Allow substitution failure.
(SubstituteCtx::substitute_token):
Handle substitution failure, include dollar sign in count of tokens to substitute.
(SubstituteCtx::substitute_tokens):
Include dollar sign in count of tokens to substitute.
* expand/rust-macro-substitute-ctx.h
(SubstituteCtx::substitute_metavar):
Adjust signature and document new substitution failure handling.
gcc/testsuite/ChangeLog:
* rust/compile/issue-2225.rs: New test.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/gimple-range-edge.cc')
0 files changed, 0 insertions, 0 deletions