Skip to content

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

Closed
@lcartey

Description

@lcartey

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>();
}

Metadata

Metadata

Assignees

Labels

Difficulty-HighA false positive or false negative report which is expected to take 1+ week effort to addressImpact-Mediumfalse positive/false negativeAn issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding Standards

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions