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
diff --git a/clang/test/Index/load-namespaces.cpp b/clang/test/Index/load-namespaces.cpp
index 2bd7cd4..cf94546 100644
--- a/clang/test/Index/load-namespaces.cpp
+++ b/clang/test/Index/load-namespaces.cpp
@@ -10,7 +10,10 @@
   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 @@
 // 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]
 
diff --git a/clang/test/Index/usrs.cpp b/clang/test/Index/usrs.cpp
index 833e312..3f50ea2 100644
--- a/clang/test/Index/usrs.cpp
+++ b/clang/test/Index/usrs.cpp
@@ -55,6 +55,8 @@
   void rez(int a, int b);
 }
 
+namespace foo_alias = foo;
+
 // RUN: c-index-test -test-load-source-usrs all %s | FileCheck %s
 // CHECK: usrs.cpp c:@N@foo Extent=[1:11 - 4:2]
 // CHECK: usrs.cpp c:@N@foo@x Extent=[2:3 - 2:8]
@@ -107,4 +109,4 @@
 // CHECK: usrs.cpp c:@F@rez Extent=[55:8 - 55:25]
 // CHECK: usrs.cpp c:usrs.cpp@941@F@rez@a Extent=[55:12 - 55:17]
 // CHECK: usrs.cpp c:usrs.cpp@948@F@rez@b Extent=[55:19 - 55:24]
-
+// CHECK: usrs.cpp c:@NA@foo_alias