summaryrefslogtreecommitdiff
path: root/test/clang-rename/Namespace.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/clang-rename/Namespace.cpp')
-rw-r--r--test/clang-rename/Namespace.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/clang-rename/Namespace.cpp b/test/clang-rename/Namespace.cpp
new file mode 100644
index 0000000000000..ec9630fdedb6a
--- /dev/null
+++ b/test/clang-rename/Namespace.cpp
@@ -0,0 +1,13 @@
+namespace gcc /* Test 1 */ { // CHECK: namespace clang /* Test 1 */ {
+ int x;
+}
+
+void boo() {
+ gcc::x = 42; // CHECK: clang::x = 42;
+}
+
+// Test 1.
+// RUN: clang-rename -offset=10 -new-name=clang %s -- | sed 's,//.*,,' | FileCheck %s
+
+// To find offsets after modifying the file, use:
+// grep -Ubo 'Foo.*' <file>