diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-03-10 23:43:53 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-03-10 23:43:53 +0000 |
commit | 275a369f003f25bd22c00c1c0fc0251c7208caf4 (patch) | |
tree | f9088a9b40a3ce195904954931a36c1adb532f15 /test/Sema/enum.c | |
parent | dd98e2cad165ca73c769e4f105a4e47c2216387a (diff) |
Add type checking for tentative definitions at the end of the
translation unit.
Thread the various declarations of variables via
VarDecl::getPreviousDeclaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66601 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/enum.c')
-rw-r--r-- | test/Sema/enum.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Sema/enum.c b/test/Sema/enum.c index 37c9a1e7cf..dbc250abc3 100644 --- a/test/Sema/enum.c +++ b/test/Sema/enum.c @@ -21,7 +21,9 @@ int test() { return sizeof(enum e) ; } -enum gccForwardEnumExtension ve; // expected-warning{{ISO C forbids forward references to 'enum' types}} +enum gccForwardEnumExtension ve; // expected-warning{{ISO C forbids forward references to 'enum' types}} \ +// expected-error{{tentative definition has type 'enum gccForwardEnumExtension' that is never completed}} \ +// expected-note{{forward declaration of 'enum gccForwardEnumExtension'}} int test2(int i) { |