summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx0x-ambig.cpp
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2013-12-31 06:26:03 +0000
committerSerge Pavlov <sepavloff@gmail.com>2013-12-31 06:26:03 +0000
commit2e3ecb660ad8d66fffb3a86628f3c952e10f6963 (patch)
treed12577a4984ecc62795128e51131289855de801d /clang/test/Parser/cxx0x-ambig.cpp
parentdf912ba6ecf4848fd60a00a04bc8982ae7883994 (diff)
downloadbcm5719-llvm-2e3ecb660ad8d66fffb3a86628f3c952e10f6963.tar.gz
bcm5719-llvm-2e3ecb660ad8d66fffb3a86628f3c952e10f6963.zip
Recover from errors in enum definition
Previously any error in enum definition body stopped parsing it. With this change parser tries to recover from errors. The patch fixes PR10982. Differential Revision: http://llvm-reviews.chandlerc.com/D2018 llvm-svn: 198259
Diffstat (limited to 'clang/test/Parser/cxx0x-ambig.cpp')
-rw-r--r--clang/test/Parser/cxx0x-ambig.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Parser/cxx0x-ambig.cpp b/clang/test/Parser/cxx0x-ambig.cpp
index 4c22ed3a9bb..b06f432c435 100644
--- a/clang/test/Parser/cxx0x-ambig.cpp
+++ b/clang/test/Parser/cxx0x-ambig.cpp
@@ -48,7 +48,7 @@ namespace bitfield {
};
// This could be a bit-field.
struct S2 {
- enum E : T { a = 1, b = 2, c = 3, 4 }; // expected-error {{non-integral type}} expected-error {{expected '}'}} expected-note {{to match}}
+ enum E : T { a = 1, b = 2, c = 3, 4 }; // expected-error {{non-integral type}} expected-error {{expected identifier}}
};
struct S3 {
enum E : int { a = 1, b = 2, c = 3, d }; // ok, defines an enum
@@ -64,7 +64,7 @@ namespace bitfield {
};
// This could be a bit-field.
struct S6 {
- enum E : int { 1 }; // expected-error {{expected '}'}} expected-note {{to match}}
+ enum E : int { 1 }; // expected-error {{expected identifier}}
};
struct U {
OpenPOWER on IntegriCloud