diff options
author | John McCall <rjmccall@apple.com> | 2010-01-13 22:07:44 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-01-13 22:07:44 +0000 |
commit | 64f7e258e9c43eefb7f82dfcd600abeed48dc395 (patch) | |
tree | 8e2f465bc47a650db3f71d1b3bebcfbf7eab9d61 /test/Sema/enum.c | |
parent | c38c3e1e726630458154534227d74eda833d26a0 (diff) |
Don't a.k.a. through the primary typedef of an anonymous tag decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93362 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/enum.c')
-rw-r--r-- | test/Sema/enum.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Sema/enum.c b/test/Sema/enum.c index 262cab50a5..916de41176 100644 --- a/test/Sema/enum.c +++ b/test/Sema/enum.c @@ -84,3 +84,11 @@ enum e1 { YES, NO }; static enum e1 badfunc(struct s1 *q) { return q->bar(); } + + +// Make sure we don't a.k.a. anonymous enums. +typedef enum { + an_enumerator = 20 +} an_enum; +// FIXME: why is this only a warning? +char * s = (an_enum) an_enumerator; // expected-warning {{incompatible integer to pointer conversion initializing 'an_enum', expected 'char *'}} |