summaryrefslogtreecommitdiffstats
path: root/clang/test/FixIt/fixit-cxx0x.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-06-25 21:37:02 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-06-25 21:37:02 +0000
commit369b9f997cc2bf19aebe0220ab484b80c5932eb2 (patch)
treeca6bfb0919b31794f0c6e133bbe2a81b55a48a7f /clang/test/FixIt/fixit-cxx0x.cpp
parentc272bab5a51067accdfc29d6339d3ce8717baf9e (diff)
downloadbcm5719-llvm-369b9f997cc2bf19aebe0220ab484b80c5932eb2.tar.gz
bcm5719-llvm-369b9f997cc2bf19aebe0220ab484b80c5932eb2.zip
Extend the "expected ';' after struct" logic to also apply to enums, and to
struct and enum forward-declarations. llvm-svn: 159164
Diffstat (limited to 'clang/test/FixIt/fixit-cxx0x.cpp')
-rw-r--r--clang/test/FixIt/fixit-cxx0x.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/FixIt/fixit-cxx0x.cpp b/clang/test/FixIt/fixit-cxx0x.cpp
index b6cc2c08b03..0c837b4beb0 100644
--- a/clang/test/FixIt/fixit-cxx0x.cpp
+++ b/clang/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}}
+ }
+}
OpenPOWER on IntegriCloud