codeql-coding-standards
codeql-coding-standards copied to clipboard
`M0-1-2`: Only report when a path is infeasible in all possible templates
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>();
}