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

M0-1-2: Only report when a path is infeasible in all possible templates #376

Closed
lcartey opened this issue Oct 2, 2023 · 0 comments · Fixed by #622
Closed

M0-1-2: Only report when a path is infeasible in all possible templates #376

lcartey opened this issue Oct 2, 2023 · 0 comments · Fixed by #622
Assignees
Labels
Difficulty-High A false positive or false negative report which is expected to take 1+ week 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

Comments

@lcartey
Copy link
Collaborator

lcartey commented Oct 2, 2023

Affected rules

  • M0-1-2

Description

Similar to M0-1-1, the infeasible path query needs to consider whether a path is infeasible in any template instantiation.

Example

template <bool x>
int foo() {
  if (x) {
    return 1;
  }
  return 0;
}

void test() {
  foo<true>();
  foo<false>();
}
@lcartey lcartey added Difficulty-High A false positive or false negative report which is expected to take 1+ week 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 2, 2023
@lcartey lcartey changed the title M0-1-2: Factor in templates M0-1-2: Only report when a path is infeasible in all possible templates Oct 3, 2023
@rvermeulen rvermeulen self-assigned this Feb 20, 2024
@ravikprasad ravikprasad assigned knewbury01 and unassigned rvermeulen Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty-High A false positive or false negative report which is expected to take 1+ week 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
Projects
Development

Successfully merging a pull request may close this issue.

3 participants