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

A5-0-2: Do not report on compiler generated conditions in range based for loops #404

Closed
lcartey opened this issue Oct 6, 2023 · 0 comments · Fixed by #510
Closed

A5-0-2: Do not report on compiler generated conditions in range based for loops #404

lcartey opened this issue Oct 6, 2023 · 0 comments · Fixed by #510
Assignees
Labels
Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium irrceproducable The described issue cannot be reproduced. user-report Issue reported by an end user of CodeQL Coding Standards

Comments

@lcartey
Copy link
Collaborator

lcartey commented Oct 6, 2023

Affected rules

  • A5-0-2

Description

I cannot reproduce this at the moment, but we have bug reports where compiler-generated condition in a range based for loop is flagged. We should be able to exclude this case with .isCompilerGenerated(), even if we can't reproduce it.

Example

for(const auto& e : some_val) { // False positive
}
@lcartey lcartey added Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium user-report Issue reported by an end user of CodeQL Coding Standards labels Oct 6, 2023
@knewbury01 knewbury01 self-assigned this Jan 23, 2024
@knewbury01 knewbury01 added the irrceproducable The described issue cannot be reproduced. label Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium irrceproducable The described issue cannot be reproduced. user-report Issue reported by an end user of CodeQL Coding Standards
Projects
Development

Successfully merging a pull request may close this issue.

2 participants