-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang-tidyenhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing feature
Description
| Bugzilla Link | 35004 |
| Version | trunk |
| OS | All |
| CC | @m4tx |
Extended Description
This is a possible idea for a new refactoring action for clang-refactor & editors that support integration with Clang's refactoring engine.
This idea suggests adding a refactoring that can convert a switch statement into an if statement. For example, this statement:
switch (x) {
case 0:
foo();
break;
case 1:
bar();
break;
}
Can become:
if (x == 1) {
foo();
} else if (x == 2) {
bar();
}
(Note: I'm intending to add an operation that implements the reverse, i.e. convert if to switch).
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang-tidyenhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing feature