1eefb6abc7699722024d757d7be96498ed4df16edDaniel Dunbar// RUN: %clang_cc1 -fsyntax-only -verify %s
29e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall
39e1d5827a6feaf18cb72a9d8eca80645e2075528John McCallnamespace test0 {
49e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall  namespace ns0 {
59e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall    class tag;
69e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall    int tag();
79e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall  }
89e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall
99e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall  namespace ns1 {
109e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall    using ns0::tag;
119e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall  }
129e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall
139e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall  namespace ns2 {
149e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall    using ns0::tag;
159e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall  }
169e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall
179e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall  using ns1::tag;
189e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall  using ns2::tag;
199e1d5827a6feaf18cb72a9d8eca80645e2075528John McCall}
20a24d6b78f6799108200202836cf3bc9133ef4b18John McCall
21a24d6b78f6799108200202836cf3bc9133ef4b18John McCall// PR 5752
22a24d6b78f6799108200202836cf3bc9133ef4b18John McCallnamespace test1 {
23a24d6b78f6799108200202836cf3bc9133ef4b18John McCall  namespace ns {
24a24d6b78f6799108200202836cf3bc9133ef4b18John McCall    void foo();
25a24d6b78f6799108200202836cf3bc9133ef4b18John McCall  }
26a24d6b78f6799108200202836cf3bc9133ef4b18John McCall
27a24d6b78f6799108200202836cf3bc9133ef4b18John McCall  using ns::foo;
28a24d6b78f6799108200202836cf3bc9133ef4b18John McCall  void foo(int);
29a24d6b78f6799108200202836cf3bc9133ef4b18John McCall
30a24d6b78f6799108200202836cf3bc9133ef4b18John McCall  namespace ns {
31a24d6b78f6799108200202836cf3bc9133ef4b18John McCall    using test1::foo;
32a24d6b78f6799108200202836cf3bc9133ef4b18John McCall  }
33a24d6b78f6799108200202836cf3bc9133ef4b18John McCall}
34f512ed7404e188e2aa1dcca4b53ea843b88e556cDouglas Gregor
35