summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/enum.c
blob: 172d308c2b0b807b03104fab123e41f12716f2f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// RUN: clang-cc -triple i386-unknown-unknown %s -emit-llvm-bc -o - | opt -std-compile-opts | llvm-dis | grep 'ret i32 6'

static enum { foo, bar = 1U } z;

int main (void)
{
  int r = 0;

  if (bar - 2 < 0)
    r += 4;
  if (foo - 1 < 0)
    r += 2;
  if (z - 1 < 0)
    r++;

  return r;
}

OpenPOWER on IntegriCloud