| Eric Liu | c265b02 | 2016-12-01 17:25:55 +0000 | [diff] [blame] | 1 | // RUN: cp %S/macro.cpp %T/macro.cpp |
| 2 | // RUN: echo "#define USING using na::nc::X" > %T/macro.h |
| 3 | // |
| 4 | // RUN: clang-change-namespace -old_namespace "na::nb" -new_namespace "x::y" --file_pattern "macro.cpp" --i %T/macro.cpp -- |
| 5 | // RUN: FileCheck -input-file=%T/macro.cpp -check-prefix=CHECK-CC %s |
| 6 | // RUN: FileCheck -input-file=%T/macro.h -check-prefix=CHECK-HEADER %s |
| 7 | // |
| 8 | // RUN: cp %S/macro.cpp %T/macro.cpp |
| 9 | // RUN: echo "#define USING using na::nc::X" > %T/macro.h |
| 10 | // RUN: clang-change-namespace -old_namespace "na::nb" -new_namespace "x::y" --file_pattern ".*" --i %T/macro.cpp -- |
| 11 | // RUN: FileCheck -input-file=%T/macro.cpp -check-prefix=CHECK-CC %s |
| 12 | // RUN: FileCheck -input-file=%T/macro.h -check-prefix=CHECK-CHANGED-HEADER %s |
| 13 | #include "macro.h" |
| 14 | namespace na { namespace nc { class X{}; } } |
| 15 | |
| 16 | namespace na { |
| 17 | namespace nb { |
| 18 | USING; |
| 19 | } |
| 20 | } |
| 21 | // CHECK-CC: namespace x { |
| 22 | // CHECK-CC: namespace y { |
| 23 | // CHECK-CC: USING; |
| 24 | // CHECK-CC: } // namespace y |
| 25 | // CHECK-CC: } // namespace x |
| 26 | |
| 27 | // CHECK-HEADER: #define USING using na::nc::X |
| 28 | |
| 29 | // CHECK-CHANGED-HEADER: #define USING using ::na::nc::X |