summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/explicit-instantiation.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2011-04-24 16:27:48 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2011-04-24 16:27:48 +0000
commit83f3b859abfb1817089374542d1fe030e887d149 (patch)
treee1c8f0ee012b3fbc817eb561b3ba1a31b01cfa7d /clang/test/SemaTemplate/explicit-instantiation.cpp
parentddb3ab494d81db5f784ee22376ab9503e7f61d55 (diff)
downloadbcm5719-llvm-83f3b859abfb1817089374542d1fe030e887d149.tar.gz
bcm5719-llvm-83f3b859abfb1817089374542d1fe030e887d149.zip
Make the invalid declarator recovery when parsing members work the same as when parsing global decls. It's still rather broken (skipping much too far when the declarator belongs to a function definition), but at least not so broken as to mismatch braces. Tested by the removal of the fixme in the template test case.
llvm-svn: 130101
Diffstat (limited to 'clang/test/SemaTemplate/explicit-instantiation.cpp')
-rw-r--r--clang/test/SemaTemplate/explicit-instantiation.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/test/SemaTemplate/explicit-instantiation.cpp b/clang/test/SemaTemplate/explicit-instantiation.cpp
index ffec3c2b97f..63016fd7156 100644
--- a/clang/test/SemaTemplate/explicit-instantiation.cpp
+++ b/clang/test/SemaTemplate/explicit-instantiation.cpp
@@ -88,15 +88,12 @@ template<typename> struct X3 { };
inline template struct X3<int>; // expected-warning{{ignoring 'inline' keyword on explicit template instantiation}}
static template struct X3<float>; // expected-warning{{ignoring 'static' keyword on explicit template instantiation}}
-namespace PR7622 { // expected-note{{to match this}}
+namespace PR7622 {
template<typename,typename=int>
struct basic_streambuf;
- // FIXME: Very poor recovery here.
template<typename,typename>
struct basic_streambuf{friend bob<>()}; // expected-error{{unknown type name 'bob'}} \
// expected-error{{ expected member name or ';' after declaration specifiers}}
- template struct basic_streambuf<int>; // expected-error{{explicit instantiation of 'basic_streambuf' in class scope}}
-} // expected-error{{expected ';' after struct}}
-
-//expected-error{{expected '}'}}
+ template struct basic_streambuf<int>;
+}
OpenPOWER on IntegriCloud