1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
3 
4 // C++0x [basic.lookup.unqual]p14:
5 //   If a variable member of a namespace is defined outside of the
6 //   scope of its namespace then any name used in the definition of
7 //   the variable member (after the declarator-id) is looked up as if
8 //   the definition of the variable member occurred in its namespace.
9 
10 namespace N {
11   struct S {};
12   S i;
13   extern S j;
14   extern S j2;
15 }
16 
17 int i = 2;
18 N::S N::j = i;
19 N::S N::j2(i);
20