blob: ffa1bab55a44e84c4dce54ec02d75f748597dfa2 [file] [log] [blame]
Richard Smith994d73f2012-04-11 20:59:20 +00001// RUN: %clang -cc1 -verify -std=c++11 %s
2
38gi///===--- recovery.cpp ---===// // expected-error {{unqualified-id}}
4namespace Std { // expected-note {{here}}
5 typedef int Important;
6}
7
8/ redeclare as an inline namespace // expected-error {{unqualified-id}}
9inline namespace Std { // expected-error {{cannot be reopened as inline}}
10 Important n;
11} / end namespace Std // expected-error {{unqualified-id}}
12int x;
13Std::Important y;
14
15// FIXME: Recover as if the typo correction were applied.
16extenr "C" { // expected-error {{did you mean 'extern'}} expected-error {{unqualified-id}}
17 void f();
18}
19void g() {
20 z = 1; // expected-error {{undeclared}}
21 f(); // expected-error {{undeclared}}
22}
23
24struct S {
25 int a, b, c;
26 S();
27};
288S::S() : a{ 5 }, b{ 6 }, c{ 2 } { // expected-error {{unqualified-id}}
29 return;
30}
31int k;
32int l = k;
33
345int m = { l }, n = m; // expected-error {{unqualified-id}}
35
36namespace N {
37 int
38} // expected-error {{unqualified-id}}
39
40// FIXME: Recover as if the typo correction were applied.
41strcut U { // expected-error {{did you mean 'struct'}}
42} *u[3]; // expected-error {{expected ';'}}