summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/html_diagnostics/relevant_lines/switch.c
blob: e9032cdece9dce55d9df88e690ad798af1f6bfc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
enum E {
  A, B, C
};

int f(enum E input) {
  int *x = 0;
  switch (input) {
    case A:
      return 1;
    case B:
      return 0;
    case C:
      return *x;
  }
}

// RUN: rm -rf %t.output
// RUN: %clang_analyze_cc1 -analyze -analyzer-checker=core -analyzer-output html -o %t.output %s
// RUN: cat %t.output/* | FileCheck %s --match-full-lines
// CHECK: var relevant_lines = {"1": {"5": 1, "6": 1, "7": 1, "12": 1, "13": 1}};
OpenPOWER on IntegriCloud