2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm-bc -o - | opt -std-compile-opts | llvm-dis | grep 'ret i32 6'
|
2010-02-03 04:10:50 +08:00
|
|
|
// RUN: %clang_cc1 -triple i386-unknown-unknown -x c++ %s -emit-llvm-bc -o - | opt -std-compile-opts | llvm-dis | grep 'ret i32 7'
|
2007-08-30 01:48:46 +08:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|