aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/namespace-alias.cpp
blob: 7d46d08678a3a7038e6f84104fb6cc2600f13c34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: clang-cc -fsyntax-only -verify %s

namespace N { };

namespace A = N;

int B; // expected-note {{previous definition is here}}
namespace B = N; // expected-error {{redefinition of 'B' as different kind of symbol}}

namespace C { } // expected-note {{previous definition is here}}
namespace C = N; // expected-error {{redefinition of 'C'}}

int i;
namespace D = i; // expected-error {{expected namespace name}}

namespace E = N::Foo; // expected-error {{expected namespace name}}