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 | 02bc54d11c70bc539d8791d3c409bdb561dad01d (patch) | |
tree | c079f0a96e89d253e4bc02aedc3b1680e4264de0 /clang/test/Sema/enum.c | |
parent | 48d462573d8f0099ce48dcd5793ac04930a8426d (diff) | |
download | bcm5719-llvm-02bc54d11c70bc539d8791d3c409bdb561dad01d.tar.gz bcm5719-llvm-02bc54d11c70bc539d8791d3c409bdb561dad01d.zip |
Don't a.k.a. through the primary typedef of an anonymous tag decl.
llvm-svn: 93362
Diffstat (limited to 'clang/test/Sema/enum.c')
-rw-r--r-- | clang/test/Sema/enum.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/Sema/enum.c b/clang/test/Sema/enum.c index 262cab50a55..916de41176b 100644 --- a/clang/test/Sema/enum.c +++ b/clang/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 *'}} |