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