summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/load-namespaces.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-31 13:31:19 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-31 13:31:19 +0000
commitdb2be6a59285e6049c18be26129cccae28447341 (patch)
treea2c78197d24509429355703b2048550952e9b3ac /clang/test/Index/load-namespaces.cpp
parentbb8a3f9f6da16302358394889ad44249d942f4a6 (diff)
downloadbcm5719-llvm-db2be6a59285e6049c18be26129cccae28447341.tar.gz
bcm5719-llvm-db2be6a59285e6049c18be26129cccae28447341.zip
Add a simple test for indexing namespaces
llvm-svn: 112598
Diffstat (limited to 'clang/test/Index/load-namespaces.cpp')
-rw-r--r--clang/test/Index/load-namespaces.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/Index/load-namespaces.cpp b/clang/test/Index/load-namespaces.cpp
new file mode 100644
index 00000000000..2bd7cd4ca28
--- /dev/null
+++ b/clang/test/Index/load-namespaces.cpp
@@ -0,0 +1,22 @@
+// Test is line- and column-sensitive; see below.
+
+namespace std {
+ namespace rel_ops {
+ void f();
+ }
+}
+
+namespace std {
+ void g();
+}
+
+// FIXME: using directives, namespace aliases
+
+// RUN: c-index-test -test-load-source all %s | FileCheck %s
+// CHECK: load-namespaces.cpp:3:11: Namespace=std:3:11 (Definition) Extent=[3:11 - 7:2]
+// CHECK: load-namespaces.cpp:4:13: Namespace=rel_ops:4:13 (Definition) Extent=[4:13 - 6:4]
+// CHECK: load-namespaces.cpp:5:10: FunctionDecl=f:5:10 Extent=[5:10 - 5:13]
+// CHECK: load-namespaces.cpp:9:11: Namespace=std:9:11 (Definition) Extent=[9:11 - 11:2]
+// CHECK: load-namespaces.cpp:10:8: FunctionDecl=g:10:8 Extent=[10:8 - 10:11]
+
+
OpenPOWER on IntegriCloud