summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/load-namespaces.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-02 17:35:32 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-02 17:35:32 +0000
commit3335f4844806f56d9db591f141e7a358367e89e8 (patch)
tree9d58eea653693fd61eb86c53afe761eec79d6d71 /clang/test/Index/load-namespaces.cpp
parentb8cfcb05d4af1421b9c0ee4f1fa1e532a39bd7d0 (diff)
downloadbcm5719-llvm-3335f4844806f56d9db591f141e7a358367e89e8.tar.gz
bcm5719-llvm-3335f4844806f56d9db591f141e7a358367e89e8.zip
Implement basic visitation for nested name specifiers via libclang
cursors. Sadly, this visitation is a hack, because we don't have proper source-location information for nested-name-specifiers in the AST. It does improve on the status quo, however. llvm-svn: 112837
Diffstat (limited to 'clang/test/Index/load-namespaces.cpp')
-rw-r--r--clang/test/Index/load-namespaces.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Index/load-namespaces.cpp b/clang/test/Index/load-namespaces.cpp
index adb6183d171..241e2413a7a 100644
--- a/clang/test/Index/load-namespaces.cpp
+++ b/clang/test/Index/load-namespaces.cpp
@@ -21,6 +21,11 @@ namespace std {
using std::g;
+void std::g() {
+}
+
+namespace my_rel_ops = std::rel_ops;
+
// 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]
@@ -37,3 +42,9 @@ using std::g;
// CHECK: load-namespaces.cpp:19:7: FunctionDecl=g:19:7 Extent=[19:7 - 19:13]
// CHECK: load-namespaces.cpp:19:12: ParmDecl=:19:12 (Definition) Extent=[19:9 - 19:13]
// CHECK: load-namespaces.cpp:22:12: UsingDeclaration=g:22:12 Extent=[22:1 - 22:13]
+// CHECK: load-namespaces.cpp:22:7: NamespaceRef=std:18:11 Extent=[22:7 - 22:10]
+// CHECK: load-namespaces.cpp:24:11: FunctionDecl=g:24:11 (Definition) Extent=[24:11 - 25:2]
+// CHECK: load-namespaces.cpp:24:6: NamespaceRef=std:18:11 Extent=[24:6 - 24:9]
+// CHECK: load-namespaces.cpp:27:11: NamespaceAlias=my_rel_ops:27:11 Extent=[27:1 - 27:36]
+// CHECK: load-namespaces.cpp:27:24: NamespaceRef=std:18:11 Extent=[27:24 - 27:27]
+// CHECK: load-namespaces.cpp:27:29: NamespaceRef=rel_ops:4:13 Extent=[27:29 - 27:36]
OpenPOWER on IntegriCloud