aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Parser/cxx-namespace-after-missing-semicolon.cpp
blob: 6d2dc606ef64233bbc3f98696b8f2ae41ad21a7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// RUN: %clang_cc1 -fsyntax-only -verify %s

UNKNOWN_MACRO_1("z", 1) // expected-error {{a type specifier is required for all declarations}}
// expected-error@-1 {{expected ';' after top level declarator}}

namespace foo {
  class bar {};
}

int variable = 0; // ok
foo::bar something; // ok

UNKNOWN_MACRO_2(void) // expected-error {{a type specifier is required for all declarations}}
// expected-error@-1 {{expected ';' after top level declarator}}

namespace baz {
  using Bool = bool;
}

int variable2 = 2; // ok
const baz::Bool flag = false;  // ok