If the type being switched on is 'char'/'wchar' then the switch cases should be shown as char constants

Open
#3,549 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Reproduce the switch statement shown in the issue and trace the decompiler or rendering entry point that formats its case labels. Verify how the switched-on type is identified for char and wchar, then confirm that the displayed case labels use character constants rather than numeric values.

Written by the indexing model from the issue text.

Description

Component: Core Core: HLIL Effort: Trivial Impact: Medium

Consider the following switch statement:
image

In this case since the type being switched on is char we should be able to display the case labels as char as well.

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Vector35/binaryninja-api

All issues in Vector35/binaryninja-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.