From 1de515100ba4997fc211f73111c9a7e5469150b0 Mon Sep 17 00:00:00 2001 From: Serge Pavlov Date: Mon, 9 Dec 2013 05:25:47 +0000 Subject: Avoid extra error messages if method definition is inside function. llvm-svn: 196757 --- clang/test/Parser/cxx-class.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'clang/test/Parser/cxx-class.cpp') diff --git a/clang/test/Parser/cxx-class.cpp b/clang/test/Parser/cxx-class.cpp index 5fac7972857..d4d8c449436 100644 --- a/clang/test/Parser/cxx-class.cpp +++ b/clang/test/Parser/cxx-class.cpp @@ -113,6 +113,16 @@ namespace PR13775 { } } +class pr16989 { + void tpl_mem(int *) { + return; + class C2 { + void f(); + }; + void C2::f() {} // expected-error{{function definition is not allowed here}} + }; +}; + // PR11109 must appear at the end of the source file class pr11109r3 { // expected-note{{to match this '{'}} public // expected-error{{expected ':'}} expected-error{{expected '}'}} expected-error{{expected ';' after class}} -- cgit v1.2.3