CodeQL library for C/C++
codeql/cpp-all 0.9.2 ( changelog , source )
Search

Predicate EdgeKind :: caseEdge

Gets the CaseEdge representing a case label with the specified lower and upper bounds. For example:

switch (x) {
  case 1:  // Edge kind is `caseEdge("1", "1")`
    return x;
  case 2...8:  // Edge kind is `caseEdge("2", "8")`
    return x - 1;
  default:  // Edge kind is `defaultEdge()`
    return 0;
 }

Import path

import semmle.code.cpp.ir.IR
CaseEdge caseEdge ( string minValue , string maxValue )