summaryrefslogtreecommitdiffstats
path: root/test/Parser/namespaces.cpp
blob: b8c7819a019f3399a0475e77a185d4c6c11936e6 (plain)
1
2
3
4
5
6
7
8
// RUN: %clang_cc1 -fsyntax-only -verify %s

// PR6596
namespace g { enum { o = 0 }; }

void foo() {
  namespace a { typedef g::o o; } // expected-error{{namespaces can only be defined in global or namespace scope}}
}