Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Control Flow Graph doesn't handle cases with multiple expressions #5731

Open
Mr-Pine opened this issue Apr 5, 2024 · 0 comments
Open
Labels

Comments

@Mr-Pine
Copy link
Contributor

Mr-Pine commented Apr 5, 2024

Describe the bug

In a case statement with multiple expressions, only the first expression is represented in the CFG:
image

Expected would be something like this:
image

Source code you are trying to analyze/transform

public int mySwitch() {
	int a = 0;
	switch (a) {
		case 1, 2: break;
		default: break;
	}
}

Source code for your Spoon processing

testMethod("mySwitch", false, null, null, null); // with testMethod from the cfg test class ForwardFlowBuilderVisitorTest.java

Actual output

No response

Expected output

No response

Spoon Version

10.4.2 / Control Flow 0.0.2-SNAPSHOT

JVM Version

21

What operating system are you using?

Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant