Richard Trieu | f858bd8 | 2011-05-26 20:11:09 +0000 | [diff] [blame] | 1 | // RUN: cp %s %t |
| 2 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 3 | // RUN: not %clang_cc1 -x c++ -fixit %t |
| 4 | // RUN: %clang_cc1 -x c++ %t |
| 5 | |
| 6 | namespace foo1::foo2::foo3 { // expected-error {{nested namespace definition must define each namespace separately}} |
| 7 | int foo(int x) { return x; } |
| 8 | } |
| 9 | |
| 10 | int foo(int x) { |
| 11 | return foo1::foo2::foo3::foo(x); |
| 12 | } |
| 13 | |
| 14 | namespace bar1 { |
| 15 | namespace bar2 { |
| 16 | namespace bar3 { |
| 17 | int bar(int x) { return x; } |
| 18 | } |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | int bar(int x) { |
| 23 | return bar1::bar2::bar3::bar(x); |
| 24 | } |