aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/nested-name-spec.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-12 22:23:27 +0000
committerChris Lattner <sabre@nondot.org>2009-04-12 22:23:27 +0000
commit8129edbb576c297df8631c3db4ac1339f4a9e8ad (patch)
treef9acaf7f7c91983eea48342635e9e1dff73146bb /test/SemaCXX/nested-name-spec.cpp
parent6491f47670661c7c9e546cbc3ca7bae2f9850f21 (diff)
Fix some C++ error recovery problems in init declarator parsing
that I noticed working on other things. Instead of emitting: t2.cc:1:8: error: use of undeclared identifier 'g' int x(*g); ^ t2.cc:1:10: error: expected ')' int x(*g); ^ t2.cc:1:6: note: to match this '(' int x(*g); ^ We now only emit: t2.cc:1:7: warning: type specifier missing, defaults to 'int' int x(*g); ^ Note that the example in SemaCXX/nested-name-spec.cpp:f4 is still not great, we now produce both of: void f4(undef::C); // expected-error {{use of undeclared identifier 'undef'}} \ expected-error {{variable has incomplete type 'void'}} The second diagnostic should be silenced by something getting marked invalid. I don't plan to fix this though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68919 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/nested-name-spec.cpp')
-rw-r--r--test/SemaCXX/nested-name-spec.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/SemaCXX/nested-name-spec.cpp b/test/SemaCXX/nested-name-spec.cpp
index fe92aab9a2..29fa001e0f 100644
--- a/test/SemaCXX/nested-name-spec.cpp
+++ b/test/SemaCXX/nested-name-spec.cpp
@@ -93,7 +93,8 @@ void f3() {
}
// make sure the following doesn't hit any asserts
-void f4(undef::C); // expected-error {{use of undeclared identifier 'undef'}} // expected-error {{expected ')'}} expected-note {{to match this '('}} // expected-error {{variable has incomplete type 'void'}}
+void f4(undef::C); // expected-error {{use of undeclared identifier 'undef'}} \
+ expected-error {{variable has incomplete type 'void'}}
typedef void C2::f5(int); // expected-error{{typedef declarator cannot be qualified}}