diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-12 21:49:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-12 21:49:30 +0000 |
commit | 4c97d762d8c5a84f6554e5bfb31d28c90df64158 (patch) | |
tree | 2bcc513ad20cbd41013ac1ac397b09b65ce5039f /lib/CodeGen/CGCXX.cpp | |
parent | 5186872629d6c9a48433bafe62dc06975bbbf7af (diff) |
Diagnose invalid uses of tagged types with a missing tag. For example, in:
struct xyz { int y; };
enum abc { ZZZ };
static xyz b;
abc c;
we used to produce:
t2.c:4:8: error: unknown type name 'xyz'
static xyz b;
^
t2.c:5:1: error: unknown type name 'abc'
abc c;
^
we now produce:
t2.c:4:8: error: use of tagged type 'xyz' without 'struct' tag
static xyz b;
^
struct
t2.c:5:1: error: use of tagged type 'abc' without 'enum' tag
abc c;
^
enum
GCC produces the normal:
t2.c:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘b’
t2.c:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘c’
rdar://6783347
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68914 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
0 files changed, 0 insertions, 0 deletions