Skip to content

Conversation

@chrchr-github
Copy link
Collaborator

No description provided.

@chrchr-github chrchr-github changed the title #13109 FP arrayIndexOutOfBounds with infinite loop and break in body Fix #13109 FP arrayIndexOutOfBounds with infinite loop and break in body Nov 2, 2024
@pfultz2
Copy link
Contributor

pfultz2 commented Nov 8, 2024

There is also escaping functions that need to be checked for such as abort or exit, which isEscapeFunction could be used.

@chrchr-github
Copy link
Collaborator Author

There is also escaping functions that need to be checked for such as abort or exit, which isEscapeFunction could be used.

Good point, done.

@chrchr-github
Copy link
Collaborator Author

chrchr-github commented Nov 11, 2024

Do we need to check for unrelated break|continue|return in nested scopes/lambdas?
Currently we wouldn't warn for

void f() {
	const int a[10] = {};
	for (int n = 0; 1; ++n) {
		if (a[n] < 1) {
			switch (a[n]) {
				case 0:
				break;
			}
		}
	}
}

@pfultz2
Copy link
Contributor

pfultz2 commented Nov 11, 2024

Its probably something we could handle in the future.

@chrchr-github chrchr-github merged commit f7d0c25 into danmar:main Dec 4, 2024
60 checks passed
@chrchr-github chrchr-github deleted the chr_13109 branch December 4, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants