diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-18 18:38:18 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-18 18:38:18 +0000 |
commit | 6eb5be81ca17bc64de0b856fde8f5a9a90757489 (patch) | |
tree | bdb555d66171391c25290927deabe74ac55e4100 /test/CodeGen/enum.c | |
parent | ce8890371fcdb983ae487c87fa40606a34896ff7 (diff) |
Comment a wacky test case
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123758 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/enum.c')
-rw-r--r-- | test/CodeGen/enum.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/CodeGen/enum.c b/test/CodeGen/enum.c index 87b0e1e671..0e239f1a8e 100644 --- a/test/CodeGen/enum.c +++ b/test/CodeGen/enum.c @@ -1,6 +1,9 @@ // RUN: %clang_cc1 -triple i386-unknown-unknown %s -O3 -emit-llvm -o - | grep 'ret i32 6' // RUN: %clang_cc1 -triple i386-unknown-unknown -x c++ %s -O3 -emit-llvm -o - | grep 'ret i32 7' +// This test case illustrates a peculiarity of the promotion of +// enumeration types in C and C++. In particular, the enumeration type +// "z" below promotes to an unsigned int in C but int in C++. static enum { foo, bar = 1U } z; int main (void) |