Implement libclang support for using declarations. Clang actually uses
three different kinds of AST nodes to represent using declarations:
UsingDecl, UnresolvedUsingValueDecl, and
UnresolvedUsingTypenameDecl. These three are collapsed into a single
cursor kind for using declarations, since libclang clients don't need
the distinction.

Several related changes here:
  - Cursor visitation of the three AST nodes for using declarations
  - Proper source-range computation for these AST nodes
  - Using declarations have no USRs, since they don't actually declare
    any entities.

llvm-svn: 112730
diff --git a/clang/test/Index/load-namespaces.cpp b/clang/test/Index/load-namespaces.cpp
index 9c8db0a..adb6183 100644
--- a/clang/test/Index/load-namespaces.cpp
+++ b/clang/test/Index/load-namespaces.cpp
@@ -15,6 +15,12 @@
 
 using namespace std0x;
 
+namespace std {
+  int g(int);
+}
+
+using std::g;
+
 // 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]
@@ -27,3 +33,7 @@
 // CHECK: load-namespaces.cpp:14:19: NamespaceRef=std98:13:11 Extent=[14:19 - 14:24]
 // CHECK: load-namespaces.cpp:16:17: UsingDirective=:16:17 Extent=[16:1 - 16:22]
 // CHECK: load-namespaces.cpp:16:17: NamespaceRef=std0x:14:11 Extent=[16:17 - 16:22]
+// CHECK: load-namespaces.cpp:18:11: Namespace=std:18:11 (Definition) Extent=[18:11 - 20:2]
+// 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]