diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-12-05 11:34:06 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-12-05 11:34:06 +0000 |
| commit | 3e284699d91b1649d00863adc8595a900956fa22 (patch) | |
| tree | ed27b4432c67bce113a4a463af687ad679401600 /clang/test/Parser | |
| parent | f89e2e2583ce57df74c0a35bfeff1da2aca508c6 (diff) | |
| download | bcm5719-llvm-3e284699d91b1649d00863adc8595a900956fa22.tar.gz bcm5719-llvm-3e284699d91b1649d00863adc8595a900956fa22.zip | |
In C++, if we hit an error in the class-head, don't try to parse the class body.
Our error recovery path may have made the class anonymous, and that has a pretty
disastrous impact on any attempt to parse a class body containing constructors.
llvm-svn: 169374
Diffstat (limited to 'clang/test/Parser')
| -rw-r--r-- | clang/test/Parser/cxx-undeclared-identifier.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Parser/recovery.cpp | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/clang/test/Parser/cxx-undeclared-identifier.cpp b/clang/test/Parser/cxx-undeclared-identifier.cpp index 6ea2965913a..a3f9e027949 100644 --- a/clang/test/Parser/cxx-undeclared-identifier.cpp +++ b/clang/test/Parser/cxx-undeclared-identifier.cpp @@ -16,6 +16,4 @@ namespace ImplicitInt { int f(a::b::c); // expected-error {{use of undeclared identifier 'a'}} class Foo::Bar { // expected-error {{use of undeclared identifier 'Foo'}} \ - // expected-note {{to match this '{'}} \ // expected-error {{expected ';' after class}} - // expected-error {{expected '}'}} diff --git a/clang/test/Parser/recovery.cpp b/clang/test/Parser/recovery.cpp index 732b9aee163..41845fb2915 100644 --- a/clang/test/Parser/recovery.cpp +++ b/clang/test/Parser/recovery.cpp @@ -43,3 +43,10 @@ strcut Uuuu { // expected-error {{did you mean the keyword 'struct'}} \ // expected-note {{'Uuuu' declared here}} } *u[3]; uuuu v; // expected-error {{did you mean 'Uuuu'}} + +struct Redefined { // expected-note {{previous}} + Redefined() {} +}; +struct Redefined { // expected-error {{redefinition}} + Redefined() {} +}; |

