recovery.cpp revision a0d5878b7e1c54551c0445354788e4259900c03c
1// 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
15extenr "C" { // expected-error {{did you mean the keyword 'extern'}}
16  void f();
17}
18void g() {
19  z = 1; // expected-error {{undeclared}}
20  f();
21}
22
23struct S {
24  int a, b, c;
25  S();
26  int x // expected-error {{expected ';'}}
27  friend void f()
28};
298S::S() : a{ 5 }, b{ 6 }, c{ 2 } { // expected-error {{unqualified-id}}
30  return;
31}
32int k;
33int l = k // expected-error {{expected ';'}}
34constexpr int foo();
35
365int m = { l }, n = m; // expected-error {{unqualified-id}}
37
38namespace N {
39  int
40} // expected-error {{unqualified-id}}
41
42strcut Uuuu { // expected-error {{did you mean the keyword 'struct'}} \
43              // expected-note {{'Uuuu' declared here}}
44} *u[3];
45uuuu v; // expected-error {{did you mean 'Uuuu'}}
46