xref: /minix3/external/bsd/llvm/dist/clang/test/Parser/namespaces.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc // PR6596
4*f4a2713aSLionel Sambuc namespace g { enum { o = 0 }; }
5*f4a2713aSLionel Sambuc 
6*f4a2713aSLionel Sambuc void foo() {
7*f4a2713aSLionel Sambuc   namespace a { typedef g::o o; } // expected-error{{namespaces can only be defined in global or namespace scope}}
8*f4a2713aSLionel Sambuc }
9*f4a2713aSLionel Sambuc 
10*f4a2713aSLionel Sambuc // PR14085
11*f4a2713aSLionel Sambuc namespace PR14085 {}
12*f4a2713aSLionel Sambuc namespace = PR14085; // expected-error {{expected identifier}}
13