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-1-9: Avoid reporting duplicate results in macro expansions #856

Open
lcartey opened this issue Feb 10, 2025 · 0 comments · May be fixed by #857
Open

A5-1-9: Avoid reporting duplicate results in macro expansions #856

lcartey opened this issue Feb 10, 2025 · 0 comments · May be fixed by #857
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

Comments

@lcartey
Copy link
Collaborator

lcartey commented Feb 10, 2025

Affected rules

  • A5-1-9

Description

A lambda defined in a macro is flagged each time it is expanded, when expanded multiple times.

Example

#define MACRO() [](int i) -> int { return i + 3; }
void test_macros() {
  MACRO(); // COMPLIANT
  MACRO(); // COMPLIANT - no duplication
}
@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 labels Feb 10, 2025
@lcartey lcartey self-assigned this Feb 10, 2025
@lcartey lcartey moved this from Reported to In Progress in Coding Standards Public Development Board Feb 10, 2025
@lcartey lcartey moved this from In Progress to Ready for review in Coding Standards Public Development Board Feb 10, 2025
@lcartey lcartey linked a pull request Feb 11, 2025 that will close this issue
30 tasks
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
Projects
Status: Ready for review
Development

Successfully merging a pull request may close this issue.

1 participant