blob: 25ff73b8ec01d779c96fba22523467c6012bfbd2 [file] [log] [blame]
David Majnemer02e76442015-01-09 09:38:14 +00001// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
Douglas Gregor05cfc292010-05-14 05:08:22 +00002
3// PR6596
4namespace g { enum { o = 0 }; }
5
6void foo() {
7 namespace a { typedef g::o o; } // expected-error{{namespaces can only be defined in global or namespace scope}}
8}
Nico Weber729f1e22012-10-27 23:44:27 +00009
10// PR14085
11namespace PR14085 {}
12namespace = PR14085; // expected-error {{expected identifier}}
David Majnemer02e76442015-01-09 09:38:14 +000013
14struct namespace_nested_in_record {
15 int k = ({namespace {}}); // expected-error {{statement expression not allowed at file scope}}
16};