diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-06-25 21:37:02 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-06-25 21:37:02 +0000 |
commit | c9f351700721150a985f21844fbfec55b04e861d (patch) | |
tree | 720006abb411c613b2adea9d7e09229e58954982 /test/FixIt/fixit-cxx0x.cpp | |
parent | f6172aee547241427e6dabdd0bd6fcaf1c046689 (diff) |
Extend the "expected ';' after struct" logic to also apply to enums, and to
struct and enum forward-declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159164 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FixIt/fixit-cxx0x.cpp')
-rw-r--r-- | test/FixIt/fixit-cxx0x.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/FixIt/fixit-cxx0x.cpp b/test/FixIt/fixit-cxx0x.cpp index b6cc2c08b0..0c837b4beb 100644 --- a/test/FixIt/fixit-cxx0x.cpp +++ b/test/FixIt/fixit-cxx0x.cpp @@ -108,3 +108,17 @@ void func(); template<int *ip> struct IP { }; // expected-note{{declared here}} IP<0> ip0; // expected-error{{null non-type template argument must be cast to template parameter type 'int *'}} +namespace MissingSemi { + struct a // expected-error {{expected ';' after struct}} + struct b // expected-error {{expected ';' after struct}} + enum x : int { x1, x2, x3 } // expected-error {{expected ';' after enum}} + struct c // expected-error {{expected ';' after struct}} + enum x : int // expected-error {{expected ';' after enum}} + // FIXME: The following gives a poor diagnostic (we parse the 'int' and the + // 'struct' as part of the same enum-base. + // enum x : int + // struct y + namespace N { + struct d // expected-error {{expected ';' after struct}} + } +} |