recovery.cpp revision 50dc12ad05d4a3a57e83852756498afce4307a77
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};
278S::S() : a{ 5 }, b{ 6 }, c{ 2 } { // expected-error {{unqualified-id}}
28  return;
29}
30int k;
31int l = k;
32
335int m = { l }, n = m; // expected-error {{unqualified-id}}
34
35namespace N {
36  int
37} // expected-error {{unqualified-id}}
38
39strcut Uuuu { // expected-error {{did you mean the keyword 'struct'}} \
40              // expected-note {{'Uuuu' declared here}}
41} *u[3];
42uuuu v; // expected-error {{did you mean 'Uuuu'}}
43