aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve-expr.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-09-27 09:50:06 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2023-02-21 12:36:31 +0100
commit7e7a95880443ebdc763034d4e290651952f48a86 (patch)
treea28d9088cf656fa718b8d7fe3be0019861167ba0 /gcc/rust/resolve/rust-ast-resolve-expr.cc
parentecc863e85efe259c799515de0c38c2297b0e3bd7 (diff)
downloadgcc-7e7a95880443ebdc763034d4e290651952f48a86.zip
gcc-7e7a95880443ebdc763034d4e290651952f48a86.tar.gz
gcc-7e7a95880443ebdc763034d4e290651952f48a86.tar.bz2
gccrs: Fix missing dead code analysis ICE on local enum definition
When resolving local enum's within a Block the name resolution info is not at the top of the stack so this patch introduces a new mappings class for miscellaneous name resolutions which can be used during path analaysis. Fixes #1272 gcc/rust/ChangeLog: * resolve/rust-name-resolver.h: Add miscellenaous item mappings. * resolve/rust-name-resolver.cc (Resolver::insert_resolved_misc): Use new mappings. (Resolver::lookup_resolved_misc): Likewise. * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): Adapt function to insert into miscelleanous mappings. * checks/lints/rust-lint-marklive.cc (MarkLive::find_ref_node_id): Allow lookup in miscelleanous mappings in mark-live phase. gcc/testsuite/ChangeLog: * rust/compile/issue-1272.rs: New test.
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-expr.cc')
0 files changed, 0 insertions, 0 deletions