[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Parser / cxx-namespace-after-missing-semicolon.cpp
blob6d2dc606ef64233bbc3f98696b8f2ae41ad21a7f
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 UNKNOWN_MACRO_1("z", 1) // expected-error {{a type specifier is required for all declarations}}
4 // expected-error@-1 {{expected ';' after top level declarator}}
6 namespace foo {
7 class bar {};
10 int variable = 0; // ok
11 foo::bar something; // ok
13 UNKNOWN_MACRO_2(void) // expected-error {{a type specifier is required for all declarations}}
14 // expected-error@-1 {{expected ';' after top level declarator}}
16 namespace baz {
17 using Bool = bool;
20 int variable2 = 2; // ok
21 const baz::Bool flag = false; // ok