summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/load-namespaces.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-31 23:48:11 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-31 23:48:11 +0000
commita89314e396bda8b7c0f9b3e7a9d9a014b7beef0c (patch)
tree4cc7ea5e8e28aa730b5b46dbf8b73593e39684f7 /clang/test/Index/load-namespaces.cpp
parent52bd0dc3bb7d3e1a30c38d3ec7e5c33e49ff3080 (diff)
downloadbcm5719-llvm-a89314e396bda8b7c0f9b3e7a9d9a014b7beef0c.tar.gz
bcm5719-llvm-a89314e396bda8b7c0f9b3e7a9d9a014b7beef0c.zip
Add libclang support for namespace aliases (visitation + USRs) along
with a new cursor kind for a reference to a namespace. There's still some oddities in the source location information for NamespaceAliasDecl that I'll address with a separate commit, so the source locations displayed in the load-namespaces.cpp test will change. llvm-svn: 112676
Diffstat (limited to 'clang/test/Index/load-namespaces.cpp')
-rw-r--r--clang/test/Index/load-namespaces.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/test/Index/load-namespaces.cpp b/clang/test/Index/load-namespaces.cpp
index 2bd7cd4ca28..cf94546a247 100644
--- a/clang/test/Index/load-namespaces.cpp
+++ b/clang/test/Index/load-namespaces.cpp
@@ -10,7 +10,10 @@ namespace std {
void g();
}
-// FIXME: using directives, namespace aliases
+namespace std98 = std;
+namespace std0x = std98;
+
+// FIXME: using directives
// 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]
@@ -18,5 +21,8 @@ namespace std {
// 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]
-
+// CHECK: load-namespaces.cpp:13:1: NamespaceAlias=std98:13:1 Extent=[13:1 - 13:10]
+// CHECK: load-namespaces.cpp:13:19: NamespaceRef=std:3:11 Extent=[13:19 - 13:22]
+// CHECK: load-namespaces.cpp:14:1: NamespaceAlias=std0x:14:1 Extent=[14:1 - 14:10]
+// CHECK: load-namespaces.cpp:14:19: NamespaceRef=std98:13:1 Extent=[14:19 - 14:24]
OpenPOWER on IntegriCloud