[cfe-commits] r135920 - in /cfe/trunk: include/clang-c/Index.h lib/Sema/SemaCodeComplete.cpp test/Index/blocks.c test/Index/cursor-ref-names.cpp test/Index/index-templates.cpp test/Index/recursive-cxx-member-calls.cpp test/Index/recursive-member-access.c tools/c-index-test/c-index-test.c tools/libclang/CIndex.cpp tools/libclang/libclang.darwin.exports tools/libclang/libclang.exports

Douglas Gregor dgregor at apple.com
Mon Jul 25 10:48:11 PDT 2011


Author: dgregor
Date: Mon Jul 25 12:48:11 2011
New Revision: 135920

URL: http://llvm.org/viewvc/llvm-project?rev=135920&view=rev
Log:
Added clang_getCursorReferenceNameRange to libclang to to retrieve parts of
a cursor reference, from Erik Verbruggen!

Added:
    cfe/trunk/test/Index/cursor-ref-names.cpp
Modified:
    cfe/trunk/include/clang-c/Index.h
    cfe/trunk/lib/Sema/SemaCodeComplete.cpp
    cfe/trunk/test/Index/blocks.c
    cfe/trunk/test/Index/index-templates.cpp
    cfe/trunk/test/Index/recursive-cxx-member-calls.cpp
    cfe/trunk/test/Index/recursive-member-access.c
    cfe/trunk/tools/c-index-test/c-index-test.c
    cfe/trunk/tools/libclang/CIndex.cpp
    cfe/trunk/tools/libclang/libclang.darwin.exports
    cfe/trunk/tools/libclang/libclang.exports

Modified: cfe/trunk/include/clang-c/Index.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/Index.h?rev=135920&r1=135919&r2=135920&view=diff
==============================================================================
--- cfe/trunk/include/clang-c/Index.h (original)
+++ cfe/trunk/include/clang-c/Index.h Mon Jul 25 12:48:11 2011
@@ -2385,6 +2385,53 @@
  * from which it was instantiated. Otherwise, returns a NULL cursor.
  */
 CINDEX_LINKAGE CXCursor clang_getSpecializedCursorTemplate(CXCursor C);
+
+/**
+ * \brief Given a cursor that references something else, return the source range
+ * covering that reference.
+ *
+ * \param C A cursor pointing to a member reference, a declaration reference, or
+ * an operator call.
+ * \param NameFlags A bitset with three independent flags: 
+ * CXNameRange_WantQualifier, CXNameRange_WantTemplateArgs, and
+ * CXNameRange_WantSinglePiece.
+ * \param PieceIndex For contiguous names or when passing the flag 
+ * CXNameRange_WantSinglePiece, only one piece with index 0 is 
+ * available. When the CXNameRange_WantSinglePiece flag is not passed for a
+ * non-contiguous names, this index can be used to retreive the individual
+ * pieces of the name. See also CXNameRange_WantSinglePiece.
+ *
+ * \returns The piece of the name pointed to by the given cursor. If there is no
+ * name, or if the PieceIndex is out-of-range, a null-cursor will be returned.
+ */
+CXSourceRange clang_getCursorReferenceNameRange(CXCursor C, unsigned NameFlags, 
+                                                unsigned PieceIndex);
+
+enum CXNameRefFlags {
+  /**
+   * \brief Include the nested-name-specifier, e.g. Foo:: in x.Foo::y, in the
+   * range.
+   */
+  CXNameRange_WantQualifier = 0x1,
+  
+  /**
+   * \brief Include the explicit template arguments, e.g. <int> in x.f<int>, in 
+   * the range.
+   */
+  CXNameRange_WantTemplateArgs = 0x2,
+
+  /**
+   * \brief If the name is non-contiguous, return the full spanning range.
+   *
+   * Non-contiguous names occur in Objective-C when a selector with two or more
+   * parameters is used, or in C++ when using an operator:
+   * \code
+   * [object doSomething:here withValue:there]; // ObjC
+   * return some_vector[1]; // C++
+   * \endcode
+   */
+  CXNameRange_WantSinglePiece = 0x4
+};
   
 /**
  * @}

Modified: cfe/trunk/lib/Sema/SemaCodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCodeComplete.cpp?rev=135920&r1=135919&r2=135920&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCodeComplete.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCodeComplete.cpp Mon Jul 25 12:48:11 2011
@@ -3706,7 +3706,7 @@
   LookupVisibleDecls(Ctx, LookupOrdinaryName, Consumer);
 
   HandleCodeCompleteResults(this, CodeCompleter, 
-                            CodeCompletionContext::CCC_Name,
+                            Results.getCompletionContext(),
                             Results.data(),Results.size());
 }
 

Modified: cfe/trunk/test/Index/blocks.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/blocks.c?rev=135920&r1=135919&r2=135920&view=diff
==============================================================================
--- cfe/trunk/test/Index/blocks.c (original)
+++ cfe/trunk/test/Index/blocks.c Mon Jul 25 12:48:11 2011
@@ -26,7 +26,7 @@
 // CHECK: blocks.c:9:37: UnexposedExpr= Extent=[9:37 - 9:55]
 // CHECK: blocks.c:9:37: UnexposedExpr=x:4:19 Extent=[9:37 - 9:51]
 // CHECK: blocks.c:9:38: TypeRef=int_t:3:13 Extent=[9:38 - 9:43]
-// CHECK: blocks.c:9:50: MemberRefExpr=x:4:19 Extent=[9:45 - 9:51]
+// CHECK: blocks.c:9:50: MemberRefExpr=x:4:19 SingleRefName=[9:50 - 9:51] RefName=[9:50 - 9:51] Extent=[9:45 - 9:51]
 // CHECK: blocks.c:9:45: DeclRefExpr=foo:9:23 Extent=[9:45 - 9:48]
 // CHECK: blocks.c:9:54: DeclRefExpr=i:8:11 Extent=[9:54 - 9:55]
 // CHECK: blocks.c:9:59: UnexposedExpr= Extent=[9:59 - 9:64]

Added: cfe/trunk/test/Index/cursor-ref-names.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/cursor-ref-names.cpp?rev=135920&view=auto
==============================================================================
--- cfe/trunk/test/Index/cursor-ref-names.cpp (added)
+++ cfe/trunk/test/Index/cursor-ref-names.cpp Mon Jul 25 12:48:11 2011
@@ -0,0 +1,47 @@
+template <typename T>
+struct Base {
+    void func();
+    int operator[](T);
+};
+
+struct Sub: public Base<int> {
+    void func();
+};
+
+template <typename T>
+inline T myMax(T a, T b)
+{ return (a > b) ? a : b; }
+
+int main()
+{
+    Sub inst;
+    inst.func();
+    inst[1];
+    inst.operator[](1);
+
+    inst.Base<int>::operator[](1);
+    myMax<int>(1, 2);
+
+    return 0;
+}
+
+// RUN: c-index-test -test-load-source all %s | FileCheck %s
+// CHECK: cursor-ref-names.cpp:17:5: UnexposedStmt= Extent=[17:5 - 17:14]
+// CHECK: cursor-ref-names.cpp:17:9: VarDecl=inst:17:9 (Definition) Extent=[17:5 - 17:13]
+// CHECK: cursor-ref-names.cpp:17:5: TypeRef=struct Sub:7:8 Extent=[17:5 - 17:8]
+// CHECK: cursor-ref-names.cpp:17:9: CallExpr=Sub:7:8 Extent=[17:9 - 17:13]
+// CHECK: cursor-ref-names.cpp:18:5: CallExpr=func:8:10 Extent=[18:5 - 18:16]
+// CHECK: cursor-ref-names.cpp:18:10: MemberRefExpr=func:8:10 SingleRefName=[18:10 - 18:14] RefName=[18:10 - 18:14] Extent=[18:5 - 18:14]
+// CHECK: cursor-ref-names.cpp:18:5: DeclRefExpr=inst:17:9 Extent=[18:5 - 18:9]
+// CHECK: cursor-ref-names.cpp:19:5: CallExpr=operator[]:4:9 SingleRefName=[19:9 - 19:12] RefName=[19:9 - 19:10] RefName=[19:11 - 19:12] Extent=[19:5 - 19:12]
+// CHECK: cursor-ref-names.cpp:19:5: DeclRefExpr=inst:17:9 Extent=[19:5 - 19:9]
+// CHECK: cursor-ref-names.cpp:19:9: DeclRefExpr=operator[]:4:9 RefName=[19:9 - 19:10] RefName=[19:11 - 19:12] Extent=[19:9 - 19:12]
+// CHECK: cursor-ref-names.cpp:20:5: CallExpr=operator[]:4:9 Extent=[20:5 - 20:23]
+// CHECK: cursor-ref-names.cpp:20:10: MemberRefExpr=operator[]:4:9 SingleRefName=[20:10 - 20:20] RefName=[20:10 - 20:18] RefName=[20:18 - 20:19] RefName=[20:19 - 20:20] Extent=[20:5 - 20:20]
+// CHECK: cursor-ref-names.cpp:20:5: DeclRefExpr=inst:17:9 Extent=[20:5 - 20:9]
+// CHECK: cursor-ref-names.cpp:22:5: CallExpr=operator[]:4:9 Extent=[22:5 - 22:34]
+// CHECK: cursor-ref-names.cpp:22:21: MemberRefExpr=operator[]:4:9 SingleRefName=[22:10 - 22:31] RefName=[22:10 - 22:21] RefName=[22:21 - 22:29] RefName=[22:29 - 22:30] RefName=[22:30 - 22:31] Extent=[22:5 - 22:31]
+// CHECK: cursor-ref-names.cpp:22:5: DeclRefExpr=inst:17:9 Extent=[22:5 - 22:9]
+// CHECK: cursor-ref-names.cpp:22:10: TemplateRef=Base:2:8 Extent=[22:10 - 22:14]
+// CHECK: cursor-ref-names.cpp:23:5: CallExpr=myMax:12:10 Extent=[23:5 - 23:21]
+// CHECK: cursor-ref-names.cpp:23:5: DeclRefExpr=myMax:12:10 RefName=[23:5 - 23:10] RefName=[23:10 - 23:15] Extent=[23:5 - 23:15]

Modified: cfe/trunk/test/Index/index-templates.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/index-templates.cpp?rev=135920&r1=135919&r2=135920&view=diff
==============================================================================
--- cfe/trunk/test/Index/index-templates.cpp (original)
+++ cfe/trunk/test/Index/index-templates.cpp Mon Jul 25 12:48:11 2011
@@ -157,11 +157,11 @@
 // CHECK-LOAD: index-templates.cpp:53:6: FunctionDecl=template_exprs:53:6 (Definition)
 // CHECK-LOAD: index-templates.cpp:54:3: CallExpr=f:4:6 Extent=[54:3 - 54:68]
 // CHECK-LOAD: index-templates.cpp:54:3: UnexposedExpr=f:4:6 Extent=[54:3 - 54:35]
-// CHECK-LOAD: index-templates.cpp:54:3: DeclRefExpr=f:4:6 Extent=[54:3 - 54:35]
+// CHECK-LOAD: index-templates.cpp:54:3: DeclRefExpr=f:4:6 RefName=[54:3 - 54:4] RefName=[54:4 - 54:35] Extent=[54:3 - 54:35]
 // CHECK-LOAD: index-templates.cpp:54:5: TypeRef=Unsigned:42:18 Extent=[54:5 - 54:13]
 // CHECK-LOAD: index-templates.cpp:54:15: DeclRefExpr=OneDimension:35:16 Extent=[54:15 - 54:27]
 // CHECK-LOAD: index-templates.cpp:54:29: TemplateRef=array:37:8 Extent=[54:29 - 54:34]
-// CHECK-LOAD: index-templates.cpp:55:8: MemberRefExpr=getAs:50:26 Extent=[55:3 - 55:23]
+// CHECK-LOAD: index-templates.cpp:55:8: MemberRefExpr=getAs:50:26 SingleRefName=[55:8 - 55:13] RefName=[55:8 - 55:13] Extent=[55:3 - 55:23]
 // CHECK-LOAD: index-templates.cpp:55:3: CallExpr=Z4:49:8 Extent=[55:3 - 55:7]
 // CHECK-LOAD: index-templates.cpp:55:14: TypeRef=Unsigned:42:18 Extent=[55:14 - 55:22]
 // CHECK-LOAD: index-templates.cpp:68:6: FunctionTemplate=unresolved_exprs:68:6 (Definition)

Modified: cfe/trunk/test/Index/recursive-cxx-member-calls.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/recursive-cxx-member-calls.cpp?rev=135920&r1=135919&r2=135920&view=diff
==============================================================================
--- cfe/trunk/test/Index/recursive-cxx-member-calls.cpp (original)
+++ cfe/trunk/test/Index/recursive-cxx-member-calls.cpp Mon Jul 25 12:48:11 2011
@@ -1699,7 +1699,7 @@
 // CHECK: 53:12: UnexposedExpr= Extent=[53:12 - 53:35]
 // CHECK: 53:12: UnexposedExpr=Length:44:10 Extent=[53:12 - 53:18]
 // CHECK: 53:12: MemberRefExpr=Length:44:10 Extent=[53:12 - 53:18]
-// CHECK: 53:29: MemberRefExpr=Length:44:10 Extent=[53:22 - 53:35]
+// CHECK: 53:29: MemberRefExpr=Length:44:10 SingleRefName=[53:29 - 53:35] RefName=[53:29 - 53:35] Extent=[53:22 - 53:35]
 // CHECK: 53:22: DeclRefExpr=Prefix:52:29 Extent=[53:22 - 53:28]
 // CHECK: 54:11: UnexposedExpr= Extent=[54:11 - 54:56]
 // CHECK: 54:11: CallExpr=memcmp:7:7 Extent=[54:11 - 54:51]
@@ -1708,9 +1708,9 @@
 // CHECK: 54:18: UnexposedExpr=Data:43:15 Extent=[54:18 - 54:22]
 // CHECK: 54:18: MemberRefExpr=Data:43:15 Extent=[54:18 - 54:22]
 // CHECK: 54:24: UnexposedExpr=Data:43:15 Extent=[54:24 - 54:35]
-// CHECK: 54:31: MemberRefExpr=Data:43:15 Extent=[54:24 - 54:35]
+// CHECK: 54:31: MemberRefExpr=Data:43:15 SingleRefName=[54:31 - 54:35] RefName=[54:31 - 54:35] Extent=[54:24 - 54:35]
 // CHECK: 54:24: DeclRefExpr=Prefix:52:29 Extent=[54:24 - 54:30]
-// CHECK: 54:44: MemberRefExpr=Length:44:10 Extent=[54:37 - 54:50]
+// CHECK: 54:44: MemberRefExpr=Length:44:10 SingleRefName=[54:44 - 54:50] RefName=[54:44 - 54:50] Extent=[54:37 - 54:50]
 // CHECK: 54:37: DeclRefExpr=Prefix:52:29 Extent=[54:37 - 54:43]
 // CHECK: 54:55: UnexposedExpr= Extent=[54:55 - 54:56]
 // CHECK: 56:8: CXXMethod=endswith:56:8 (Definition) Extent=[56:3 - 59:4]
@@ -1722,7 +1722,7 @@
 // CHECK: 57:12: UnexposedExpr= Extent=[57:12 - 57:35]
 // CHECK: 57:12: UnexposedExpr=Length:44:10 Extent=[57:12 - 57:18]
 // CHECK: 57:12: MemberRefExpr=Length:44:10 Extent=[57:12 - 57:18]
-// CHECK: 57:29: MemberRefExpr=Length:44:10 Extent=[57:22 - 57:35]
+// CHECK: 57:29: MemberRefExpr=Length:44:10 SingleRefName=[57:29 - 57:35] RefName=[57:29 - 57:35] Extent=[57:22 - 57:35]
 // CHECK: 57:22: DeclRefExpr=Suffix:56:27 Extent=[57:22 - 57:28]
 // CHECK: 58:7: UnexposedExpr= Extent=[58:7 - 58:69]
 // CHECK: 58:7: CallExpr=memcmp:7:7 Extent=[58:7 - 58:64]
@@ -1732,12 +1732,12 @@
 // CHECK: 58:14: UnexposedExpr= Extent=[58:14 - 58:35]
 // CHECK: 58:14: CallExpr=end:50:12 Extent=[58:14 - 58:19]
 // CHECK: 58:14: MemberRefExpr=end:50:12 Extent=[58:14 - 58:17]
-// CHECK: 58:29: MemberRefExpr=Length:44:10 Extent=[58:22 - 58:35]
+// CHECK: 58:29: MemberRefExpr=Length:44:10 SingleRefName=[58:29 - 58:35] RefName=[58:29 - 58:35] Extent=[58:22 - 58:35]
 // CHECK: 58:22: DeclRefExpr=Suffix:56:27 Extent=[58:22 - 58:28]
 // CHECK: 58:37: UnexposedExpr=Data:43:15 Extent=[58:37 - 58:48]
-// CHECK: 58:44: MemberRefExpr=Data:43:15 Extent=[58:37 - 58:48]
+// CHECK: 58:44: MemberRefExpr=Data:43:15 SingleRefName=[58:44 - 58:48] RefName=[58:44 - 58:48] Extent=[58:37 - 58:48]
 // CHECK: 58:37: DeclRefExpr=Suffix:56:27 Extent=[58:37 - 58:43]
-// CHECK: 58:57: MemberRefExpr=Length:44:10 Extent=[58:50 - 58:63]
+// CHECK: 58:57: MemberRefExpr=Length:44:10 SingleRefName=[58:57 - 58:63] RefName=[58:57 - 58:63] Extent=[58:50 - 58:63]
 // CHECK: 58:50: DeclRefExpr=Suffix:56:27 Extent=[58:50 - 58:56]
 // CHECK: 58:68: UnexposedExpr= Extent=[58:68 - 58:69]
 // CHECK: 60:13: CXXMethod=substr:60:13 (Definition) Extent=[60:3 - 62:4]
@@ -1776,7 +1776,7 @@
 // CHECK: 69:18: TemplateRef=pair:4:44 Extent=[69:18 - 69:22]
 // CHECK: 69:25: TypeRef=class clang::IdentifierInfo:66:7 Extent=[69:25 - 69:39]
 // CHECK: 70:5: UnexposedStmt= Extent=[70:5 - 70:47]
-// CHECK: 70:41: MemberRefExpr=second:4:55 Extent=[70:12 - 70:47]
+// CHECK: 70:41: MemberRefExpr=second:4:55 SingleRefName=[70:41 - 70:47] RefName=[70:41 - 70:47] Extent=[70:12 - 70:47]
 // CHECK: 70:12: UnexposedExpr= Extent=[70:12 - 70:39]
 // CHECK: 70:13: UnexposedExpr= Extent=[70:13 - 70:38]
 // CHECK: 70:20: TypeRef=actualtype:69:54 Extent=[70:20 - 70:30]
@@ -1791,7 +1791,7 @@
 // CHECK: 74:17: VarDecl=p:74:17 (Definition) Extent=[74:5 - 74:60]
 // CHECK: 74:21: UnexposedExpr= Extent=[74:21 - 74:60]
 // CHECK: 74:21: UnexposedExpr=second:4:55 Extent=[74:21 - 74:56]
-// CHECK: 74:50: MemberRefExpr=second:4:55 Extent=[74:21 - 74:56]
+// CHECK: 74:50: MemberRefExpr=second:4:55 SingleRefName=[74:50 - 74:56] RefName=[74:50 - 74:56] Extent=[74:21 - 74:56]
 // CHECK: 74:21: UnexposedExpr= Extent=[74:21 - 74:48]
 // CHECK: 74:22: UnexposedExpr= Extent=[74:22 - 74:47]
 // CHECK: 74:29: TypeRef=actualtype:73:54 Extent=[74:29 - 74:39]
@@ -1875,12 +1875,12 @@
 // CHECK: 101:30: CallExpr= Extent=[101:30 - 101:45]
 // CHECK: 101:30: UnexposedExpr=getName:77:19 Extent=[101:30 - 101:45]
 // CHECK: 101:30: CallExpr=getName:77:19 Extent=[101:30 - 101:45]
-// CHECK: 101:36: MemberRefExpr=getName:77:19 Extent=[101:30 - 101:43]
+// CHECK: 101:36: MemberRefExpr=getName:77:19 SingleRefName=[101:36 - 101:43] RefName=[101:36 - 101:43] Extent=[101:30 - 101:43]
 // CHECK: 101:30: DeclRefExpr=Name:100:67 Extent=[101:30 - 101:34]
 // CHECK: 102:3: UnexposedStmt= Extent=[102:3 - 103:55]
 // CHECK: 102:7: UnexposedExpr= Extent=[102:7 - 102:59]
 // CHECK: 102:7: CallExpr=startswith:52:8 Extent=[102:7 - 102:32]
-// CHECK: 102:16: MemberRefExpr=startswith:52:8 Extent=[102:7 - 102:26]
+// CHECK: 102:16: MemberRefExpr=startswith:52:8 SingleRefName=[102:16 - 102:26] RefName=[102:16 - 102:26] Extent=[102:7 - 102:26]
 // CHECK: 102:7: UnexposedExpr=AttrName:101:19 Extent=[102:7 - 102:15]
 // CHECK: 102:7: DeclRefExpr=AttrName:101:19 Extent=[102:7 - 102:15]
 // CHECK: 102:27: CallExpr= Extent=[102:27 - 102:31]
@@ -1890,7 +1890,7 @@
 // CHECK: 102:27: UnexposedExpr= Extent=[102:27 - 102:31]
 // CHECK: 102:27: UnexposedExpr= Extent=[102:27 - 102:31]
 // CHECK: 102:36: CallExpr=endswith:56:8 Extent=[102:36 - 102:59]
-// CHECK: 102:45: MemberRefExpr=endswith:56:8 Extent=[102:36 - 102:53]
+// CHECK: 102:45: MemberRefExpr=endswith:56:8 SingleRefName=[102:45 - 102:53] RefName=[102:45 - 102:53] Extent=[102:36 - 102:53]
 // CHECK: 102:36: UnexposedExpr=AttrName:101:19 Extent=[102:36 - 102:44]
 // CHECK: 102:36: DeclRefExpr=AttrName:101:19 Extent=[102:36 - 102:44]
 // CHECK: 102:54: CallExpr= Extent=[102:54 - 102:58]
@@ -1905,180 +1905,180 @@
 // CHECK: 103:14: DeclRefExpr=operator=:38:7
 // CHECK: 103:16: UnexposedExpr=substr:60:13 Extent=[103:16 - 103:55]
 // CHECK: 103:16: CallExpr=substr:60:13 Extent=[103:16 - 103:55]
-// CHECK: 103:25: MemberRefExpr=substr:60:13 Extent=[103:16 - 103:31]
+// CHECK: 103:25: MemberRefExpr=substr:60:13 SingleRefName=[103:25 - 103:31] RefName=[103:25 - 103:31] Extent=[103:16 - 103:31]
 // CHECK: 103:16: UnexposedExpr=AttrName:101:19 Extent=[103:16 - 103:24]
 // CHECK: 103:16: DeclRefExpr=AttrName:101:19 Extent=[103:16 - 103:24]
 // CHECK: 103:32: UnexposedExpr= Extent=[103:32 - 103:33]
 // CHECK: 103:32: UnexposedExpr= Extent=[103:32 - 103:33]
 // CHECK: 103:35: UnexposedExpr= Extent=[103:35 - 103:54]
 // CHECK: 103:35: CallExpr=size:51:10 Extent=[103:35 - 103:50]
-// CHECK: 103:44: MemberRefExpr=size:51:10 Extent=[103:35 - 103:48]
+// CHECK: 103:44: MemberRefExpr=size:51:10 SingleRefName=[103:44 - 103:48] RefName=[103:44 - 103:48] Extent=[103:35 - 103:48]
 // CHECK: 103:35: UnexposedExpr=AttrName:101:19 Extent=[103:35 - 103:43]
 // CHECK: 103:35: DeclRefExpr=AttrName:101:19 Extent=[103:35 - 103:43]
 // CHECK: 103:53: UnexposedExpr= Extent=[103:53 - 103:54]
 // CHECK: 103:53: UnexposedExpr= Extent=[103:53 - 103:54]
 // CHECK: 105:3: UnexposedStmt= Extent=[105:3 - 185:31]
 // CHECK: 105:10: CallExpr=Default:92:5 Extent=[105:10 - 185:31]
-// CHECK: 185:6: MemberRefExpr=Default:92:5 Extent=[105:10 - 185:13]
+// CHECK: 185:6: MemberRefExpr=Default:92:5 SingleRefName=[185:6 - 185:13] RefName=[185:6 - 185:13] Extent=[105:10 - 185:13]
 // CHECK: 105:10: UnexposedExpr=Case:88:42 Extent=[105:10 - 184:33]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 184:33]
-// CHECK: 184:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 184:10]
+// CHECK: 184:6: MemberRefExpr=Case:88:42 SingleRefName=[184:6 - 184:10] RefName=[184:6 - 184:10] Extent=[105:10 - 184:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 183:37]
-// CHECK: 183:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 183:10]
+// CHECK: 183:6: MemberRefExpr=Case:88:42 SingleRefName=[183:6 - 183:10] RefName=[183:6 - 183:10] Extent=[105:10 - 183:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 182:37]
-// CHECK: 182:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 182:10]
+// CHECK: 182:6: MemberRefExpr=Case:88:42 SingleRefName=[182:6 - 182:10] RefName=[182:6 - 182:10] Extent=[105:10 - 182:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 181:35]
-// CHECK: 181:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 181:10]
+// CHECK: 181:6: MemberRefExpr=Case:88:42 SingleRefName=[181:6 - 181:10] RefName=[181:6 - 181:10] Extent=[105:10 - 181:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 180:31]
-// CHECK: 180:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 180:10]
+// CHECK: 180:6: MemberRefExpr=Case:88:42 SingleRefName=[180:6 - 180:10] RefName=[180:6 - 180:10] Extent=[105:10 - 180:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 179:31]
-// CHECK: 179:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 179:10]
+// CHECK: 179:6: MemberRefExpr=Case:88:42 SingleRefName=[179:6 - 179:10] RefName=[179:6 - 179:10] Extent=[105:10 - 179:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 178:35]
-// CHECK: 178:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 178:10]
+// CHECK: 178:6: MemberRefExpr=Case:88:42 SingleRefName=[178:6 - 178:10] RefName=[178:6 - 178:10] Extent=[105:10 - 178:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 177:63]
-// CHECK: 177:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 177:10]
+// CHECK: 177:6: MemberRefExpr=Case:88:42 SingleRefName=[177:6 - 177:10] RefName=[177:6 - 177:10] Extent=[105:10 - 177:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 176:45]
-// CHECK: 176:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 176:10]
+// CHECK: 176:6: MemberRefExpr=Case:88:42 SingleRefName=[176:6 - 176:10] RefName=[176:6 - 176:10] Extent=[105:10 - 176:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 175:51]
-// CHECK: 175:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 175:10]
+// CHECK: 175:6: MemberRefExpr=Case:88:42 SingleRefName=[175:6 - 175:10] RefName=[175:6 - 175:10] Extent=[105:10 - 175:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 174:49]
-// CHECK: 174:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 174:10]
+// CHECK: 174:6: MemberRefExpr=Case:88:42 SingleRefName=[174:6 - 174:10] RefName=[174:6 - 174:10] Extent=[105:10 - 174:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 173:49]
-// CHECK: 173:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 173:10]
+// CHECK: 173:6: MemberRefExpr=Case:88:42 SingleRefName=[173:6 - 173:10] RefName=[173:6 - 173:10] Extent=[105:10 - 173:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 172:53]
-// CHECK: 172:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 172:10]
+// CHECK: 172:6: MemberRefExpr=Case:88:42 SingleRefName=[172:6 - 172:10] RefName=[172:6 - 172:10] Extent=[105:10 - 172:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 171:57]
-// CHECK: 171:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 171:10]
+// CHECK: 171:6: MemberRefExpr=Case:88:42 SingleRefName=[171:6 - 171:10] RefName=[171:6 - 171:10] Extent=[105:10 - 171:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 170:65]
-// CHECK: 170:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 170:10]
+// CHECK: 170:6: MemberRefExpr=Case:88:42 SingleRefName=[170:6 - 170:10] RefName=[170:6 - 170:10] Extent=[105:10 - 170:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 169:57]
-// CHECK: 169:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 169:10]
+// CHECK: 169:6: MemberRefExpr=Case:88:42 SingleRefName=[169:6 - 169:10] RefName=[169:6 - 169:10] Extent=[105:10 - 169:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 168:65]
-// CHECK: 168:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 168:10]
+// CHECK: 168:6: MemberRefExpr=Case:88:42 SingleRefName=[168:6 - 168:10] RefName=[168:6 - 168:10] Extent=[105:10 - 168:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 167:55]
-// CHECK: 167:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 167:10]
+// CHECK: 167:6: MemberRefExpr=Case:88:42 SingleRefName=[167:6 - 167:10] RefName=[167:6 - 167:10] Extent=[105:10 - 167:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 166:55]
-// CHECK: 166:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 166:10]
+// CHECK: 166:6: MemberRefExpr=Case:88:42 SingleRefName=[166:6 - 166:10] RefName=[166:6 - 166:10] Extent=[105:10 - 166:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 165:53]
-// CHECK: 165:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 165:10]
+// CHECK: 165:6: MemberRefExpr=Case:88:42 SingleRefName=[165:6 - 165:10] RefName=[165:6 - 165:10] Extent=[105:10 - 165:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 164:53]
-// CHECK: 164:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 164:10]
+// CHECK: 164:6: MemberRefExpr=Case:88:42 SingleRefName=[164:6 - 164:10] RefName=[164:6 - 164:10] Extent=[105:10 - 164:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 163:49]
-// CHECK: 163:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 163:10]
+// CHECK: 163:6: MemberRefExpr=Case:88:42 SingleRefName=[163:6 - 163:10] RefName=[163:6 - 163:10] Extent=[105:10 - 163:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 162:47]
-// CHECK: 162:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 162:10]
+// CHECK: 162:6: MemberRefExpr=Case:88:42 SingleRefName=[162:6 - 162:10] RefName=[162:6 - 162:10] Extent=[105:10 - 162:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 161:45]
-// CHECK: 161:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 161:10]
+// CHECK: 161:6: MemberRefExpr=Case:88:42 SingleRefName=[161:6 - 161:10] RefName=[161:6 - 161:10] Extent=[105:10 - 161:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 160:45]
-// CHECK: 160:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 160:10]
+// CHECK: 160:6: MemberRefExpr=Case:88:42 SingleRefName=[160:6 - 160:10] RefName=[160:6 - 160:10] Extent=[105:10 - 160:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 159:45]
-// CHECK: 159:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 159:10]
+// CHECK: 159:6: MemberRefExpr=Case:88:42 SingleRefName=[159:6 - 159:10] RefName=[159:6 - 159:10] Extent=[105:10 - 159:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 158:45]
-// CHECK: 158:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 158:10]
+// CHECK: 158:6: MemberRefExpr=Case:88:42 SingleRefName=[158:6 - 158:10] RefName=[158:6 - 158:10] Extent=[105:10 - 158:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 157:43]
-// CHECK: 157:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 157:10]
+// CHECK: 157:6: MemberRefExpr=Case:88:42 SingleRefName=[157:6 - 157:10] RefName=[157:6 - 157:10] Extent=[105:10 - 157:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 156:41]
-// CHECK: 156:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 156:10]
+// CHECK: 156:6: MemberRefExpr=Case:88:42 SingleRefName=[156:6 - 156:10] RefName=[156:6 - 156:10] Extent=[105:10 - 156:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 155:41]
-// CHECK: 155:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 155:10]
+// CHECK: 155:6: MemberRefExpr=Case:88:42 SingleRefName=[155:6 - 155:10] RefName=[155:6 - 155:10] Extent=[105:10 - 155:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 154:41]
-// CHECK: 154:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 154:10]
+// CHECK: 154:6: MemberRefExpr=Case:88:42 SingleRefName=[154:6 - 154:10] RefName=[154:6 - 154:10] Extent=[105:10 - 154:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 153:37]
-// CHECK: 153:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 153:10]
+// CHECK: 153:6: MemberRefExpr=Case:88:42 SingleRefName=[153:6 - 153:10] RefName=[153:6 - 153:10] Extent=[105:10 - 153:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 152:41]
-// CHECK: 152:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 152:10]
+// CHECK: 152:6: MemberRefExpr=Case:88:42 SingleRefName=[152:6 - 152:10] RefName=[152:6 - 152:10] Extent=[105:10 - 152:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 151:39]
-// CHECK: 151:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 151:10]
+// CHECK: 151:6: MemberRefExpr=Case:88:42 SingleRefName=[151:6 - 151:10] RefName=[151:6 - 151:10] Extent=[105:10 - 151:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 150:39]
-// CHECK: 150:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 150:10]
+// CHECK: 150:6: MemberRefExpr=Case:88:42 SingleRefName=[150:6 - 150:10] RefName=[150:6 - 150:10] Extent=[105:10 - 150:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 149:39]
-// CHECK: 149:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 149:10]
+// CHECK: 149:6: MemberRefExpr=Case:88:42 SingleRefName=[149:6 - 149:10] RefName=[149:6 - 149:10] Extent=[105:10 - 149:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 148:39]
-// CHECK: 148:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 148:10]
+// CHECK: 148:6: MemberRefExpr=Case:88:42 SingleRefName=[148:6 - 148:10] RefName=[148:6 - 148:10] Extent=[105:10 - 148:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 147:39]
-// CHECK: 147:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 147:10]
+// CHECK: 147:6: MemberRefExpr=Case:88:42 SingleRefName=[147:6 - 147:10] RefName=[147:6 - 147:10] Extent=[105:10 - 147:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 146:39]
-// CHECK: 146:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 146:10]
+// CHECK: 146:6: MemberRefExpr=Case:88:42 SingleRefName=[146:6 - 146:10] RefName=[146:6 - 146:10] Extent=[105:10 - 146:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 145:41]
-// CHECK: 145:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 145:10]
+// CHECK: 145:6: MemberRefExpr=Case:88:42 SingleRefName=[145:6 - 145:10] RefName=[145:6 - 145:10] Extent=[105:10 - 145:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 144:37]
-// CHECK: 144:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 144:10]
+// CHECK: 144:6: MemberRefExpr=Case:88:42 SingleRefName=[144:6 - 144:10] RefName=[144:6 - 144:10] Extent=[105:10 - 144:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 143:37]
-// CHECK: 143:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 143:10]
+// CHECK: 143:6: MemberRefExpr=Case:88:42 SingleRefName=[143:6 - 143:10] RefName=[143:6 - 143:10] Extent=[105:10 - 143:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 142:35]
-// CHECK: 142:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 142:10]
+// CHECK: 142:6: MemberRefExpr=Case:88:42 SingleRefName=[142:6 - 142:10] RefName=[142:6 - 142:10] Extent=[105:10 - 142:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 141:35]
-// CHECK: 141:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 141:10]
+// CHECK: 141:6: MemberRefExpr=Case:88:42 SingleRefName=[141:6 - 141:10] RefName=[141:6 - 141:10] Extent=[105:10 - 141:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 140:35]
-// CHECK: 140:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 140:10]
+// CHECK: 140:6: MemberRefExpr=Case:88:42 SingleRefName=[140:6 - 140:10] RefName=[140:6 - 140:10] Extent=[105:10 - 140:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 139:35]
-// CHECK: 139:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 139:10]
+// CHECK: 139:6: MemberRefExpr=Case:88:42 SingleRefName=[139:6 - 139:10] RefName=[139:6 - 139:10] Extent=[105:10 - 139:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 138:35]
-// CHECK: 138:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 138:10]
+// CHECK: 138:6: MemberRefExpr=Case:88:42 SingleRefName=[138:6 - 138:10] RefName=[138:6 - 138:10] Extent=[105:10 - 138:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 137:55]
-// CHECK: 137:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 137:10]
+// CHECK: 137:6: MemberRefExpr=Case:88:42 SingleRefName=[137:6 - 137:10] RefName=[137:6 - 137:10] Extent=[105:10 - 137:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 136:35]
-// CHECK: 136:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 136:10]
+// CHECK: 136:6: MemberRefExpr=Case:88:42 SingleRefName=[136:6 - 136:10] RefName=[136:6 - 136:10] Extent=[105:10 - 136:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 135:35]
-// CHECK: 135:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 135:10]
+// CHECK: 135:6: MemberRefExpr=Case:88:42 SingleRefName=[135:6 - 135:10] RefName=[135:6 - 135:10] Extent=[105:10 - 135:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 134:35]
-// CHECK: 134:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 134:10]
+// CHECK: 134:6: MemberRefExpr=Case:88:42 SingleRefName=[134:6 - 134:10] RefName=[134:6 - 134:10] Extent=[105:10 - 134:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 133:35]
-// CHECK: 133:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 133:10]
+// CHECK: 133:6: MemberRefExpr=Case:88:42 SingleRefName=[133:6 - 133:10] RefName=[133:6 - 133:10] Extent=[105:10 - 133:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 132:33]
-// CHECK: 132:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 132:10]
+// CHECK: 132:6: MemberRefExpr=Case:88:42 SingleRefName=[132:6 - 132:10] RefName=[132:6 - 132:10] Extent=[105:10 - 132:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 131:33]
-// CHECK: 131:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 131:10]
+// CHECK: 131:6: MemberRefExpr=Case:88:42 SingleRefName=[131:6 - 131:10] RefName=[131:6 - 131:10] Extent=[105:10 - 131:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 130:33]
-// CHECK: 130:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 130:10]
+// CHECK: 130:6: MemberRefExpr=Case:88:42 SingleRefName=[130:6 - 130:10] RefName=[130:6 - 130:10] Extent=[105:10 - 130:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 129:33]
-// CHECK: 129:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 129:10]
+// CHECK: 129:6: MemberRefExpr=Case:88:42 SingleRefName=[129:6 - 129:10] RefName=[129:6 - 129:10] Extent=[105:10 - 129:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 128:33]
-// CHECK: 128:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 128:10]
+// CHECK: 128:6: MemberRefExpr=Case:88:42 SingleRefName=[128:6 - 128:10] RefName=[128:6 - 128:10] Extent=[105:10 - 128:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 127:33]
-// CHECK: 127:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 127:10]
+// CHECK: 127:6: MemberRefExpr=Case:88:42 SingleRefName=[127:6 - 127:10] RefName=[127:6 - 127:10] Extent=[105:10 - 127:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 126:33]
-// CHECK: 126:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 126:10]
+// CHECK: 126:6: MemberRefExpr=Case:88:42 SingleRefName=[126:6 - 126:10] RefName=[126:6 - 126:10] Extent=[105:10 - 126:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 125:29]
-// CHECK: 125:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 125:10]
+// CHECK: 125:6: MemberRefExpr=Case:88:42 SingleRefName=[125:6 - 125:10] RefName=[125:6 - 125:10] Extent=[105:10 - 125:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 124:33]
-// CHECK: 124:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 124:10]
+// CHECK: 124:6: MemberRefExpr=Case:88:42 SingleRefName=[124:6 - 124:10] RefName=[124:6 - 124:10] Extent=[105:10 - 124:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 123:33]
-// CHECK: 123:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 123:10]
+// CHECK: 123:6: MemberRefExpr=Case:88:42 SingleRefName=[123:6 - 123:10] RefName=[123:6 - 123:10] Extent=[105:10 - 123:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 122:31]
-// CHECK: 122:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 122:10]
+// CHECK: 122:6: MemberRefExpr=Case:88:42 SingleRefName=[122:6 - 122:10] RefName=[122:6 - 122:10] Extent=[105:10 - 122:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 121:31]
-// CHECK: 121:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 121:10]
+// CHECK: 121:6: MemberRefExpr=Case:88:42 SingleRefName=[121:6 - 121:10] RefName=[121:6 - 121:10] Extent=[105:10 - 121:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 120:31]
-// CHECK: 120:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 120:10]
+// CHECK: 120:6: MemberRefExpr=Case:88:42 SingleRefName=[120:6 - 120:10] RefName=[120:6 - 120:10] Extent=[105:10 - 120:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 119:31]
-// CHECK: 119:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 119:10]
+// CHECK: 119:6: MemberRefExpr=Case:88:42 SingleRefName=[119:6 - 119:10] RefName=[119:6 - 119:10] Extent=[105:10 - 119:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 118:31]
-// CHECK: 118:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 118:10]
+// CHECK: 118:6: MemberRefExpr=Case:88:42 SingleRefName=[118:6 - 118:10] RefName=[118:6 - 118:10] Extent=[105:10 - 118:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 117:31]
-// CHECK: 117:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 117:10]
+// CHECK: 117:6: MemberRefExpr=Case:88:42 SingleRefName=[117:6 - 117:10] RefName=[117:6 - 117:10] Extent=[105:10 - 117:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 116:31]
-// CHECK: 116:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 116:10]
+// CHECK: 116:6: MemberRefExpr=Case:88:42 SingleRefName=[116:6 - 116:10] RefName=[116:6 - 116:10] Extent=[105:10 - 116:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 115:29]
-// CHECK: 115:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 115:10]
+// CHECK: 115:6: MemberRefExpr=Case:88:42 SingleRefName=[115:6 - 115:10] RefName=[115:6 - 115:10] Extent=[105:10 - 115:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 114:29]
-// CHECK: 114:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 114:10]
+// CHECK: 114:6: MemberRefExpr=Case:88:42 SingleRefName=[114:6 - 114:10] RefName=[114:6 - 114:10] Extent=[105:10 - 114:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 113:29]
-// CHECK: 113:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 113:10]
+// CHECK: 113:6: MemberRefExpr=Case:88:42 SingleRefName=[113:6 - 113:10] RefName=[113:6 - 113:10] Extent=[105:10 - 113:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 112:31]
-// CHECK: 112:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 112:10]
+// CHECK: 112:6: MemberRefExpr=Case:88:42 SingleRefName=[112:6 - 112:10] RefName=[112:6 - 112:10] Extent=[105:10 - 112:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 111:29]
-// CHECK: 111:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 111:10]
+// CHECK: 111:6: MemberRefExpr=Case:88:42 SingleRefName=[111:6 - 111:10] RefName=[111:6 - 111:10] Extent=[105:10 - 111:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 110:27]
-// CHECK: 110:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 110:10]
+// CHECK: 110:6: MemberRefExpr=Case:88:42 SingleRefName=[110:6 - 110:10] RefName=[110:6 - 110:10] Extent=[105:10 - 110:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 109:27]
-// CHECK: 109:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 109:10]
+// CHECK: 109:6: MemberRefExpr=Case:88:42 SingleRefName=[109:6 - 109:10] RefName=[109:6 - 109:10] Extent=[105:10 - 109:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 108:27]
-// CHECK: 108:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 108:10]
+// CHECK: 108:6: MemberRefExpr=Case:88:42 SingleRefName=[108:6 - 108:10] RefName=[108:6 - 108:10] Extent=[105:10 - 108:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 107:33]
-// CHECK: 107:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 107:10]
+// CHECK: 107:6: MemberRefExpr=Case:88:42 SingleRefName=[107:6 - 107:10] RefName=[107:6 - 107:10] Extent=[105:10 - 107:10]
 // CHECK: 105:10: CallExpr=Case:88:42 Extent=[105:10 - 106:27]
-// CHECK: 106:6: MemberRefExpr=Case:88:42 Extent=[105:10 - 106:10]
+// CHECK: 106:6: MemberRefExpr=Case:88:42 SingleRefName=[106:6 - 106:10] RefName=[106:6 - 106:10] Extent=[105:10 - 106:10]
 // CHECK: 105:10: UnexposedExpr=StringSwitch:87:12 Extent=[105:10 - 105:63]
 // CHECK: 105:16: TemplateRef=StringSwitch:83:47 Extent=[105:16 - 105:28]
 // CHECK: 105:10: CallExpr=StringSwitch:87:12 Extent=[105:10 - 105:62]

Modified: cfe/trunk/test/Index/recursive-member-access.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/recursive-member-access.c?rev=135920&r1=135919&r2=135920&view=diff
==============================================================================
--- cfe/trunk/test/Index/recursive-member-access.c (original)
+++ cfe/trunk/test/Index/recursive-member-access.c Mon Jul 25 12:48:11 2011
@@ -133,124 +133,124 @@
 // CHECK: 6:29: TypeRef=struct rdar8650865:1:8 Extent=[6:29 - 6:40]
 // CHECK: 6:45: UnexposedStmt= Extent=[6:45 - 124:2]
 // CHECK: 7:3: UnexposedStmt= Extent=[7:3 - 123:8]
-// CHECK: 123:7: MemberRefExpr=x:3:7 Extent=[7:10 - 123:8]
-// CHECK: 122:7: MemberRefExpr=first:2:23 Extent=[7:10 - 122:12]
-// CHECK: 121:7: MemberRefExpr=first:2:23 Extent=[7:10 - 121:12]
-// CHECK: 120:7: MemberRefExpr=first:2:23 Extent=[7:10 - 120:12]
-// CHECK: 119:7: MemberRefExpr=first:2:23 Extent=[7:10 - 119:12]
-// CHECK: 118:7: MemberRefExpr=first:2:23 Extent=[7:10 - 118:12]
-// CHECK: 117:7: MemberRefExpr=first:2:23 Extent=[7:10 - 117:12]
-// CHECK: 116:7: MemberRefExpr=first:2:23 Extent=[7:10 - 116:12]
-// CHECK: 115:7: MemberRefExpr=first:2:23 Extent=[7:10 - 115:12]
-// CHECK: 114:7: MemberRefExpr=first:2:23 Extent=[7:10 - 114:12]
-// CHECK: 113:7: MemberRefExpr=first:2:23 Extent=[7:10 - 113:12]
-// CHECK: 112:7: MemberRefExpr=first:2:23 Extent=[7:10 - 112:12]
-// CHECK: 111:7: MemberRefExpr=first:2:23 Extent=[7:10 - 111:12]
-// CHECK: 110:7: MemberRefExpr=first:2:23 Extent=[7:10 - 110:12]
-// CHECK: 109:7: MemberRefExpr=first:2:23 Extent=[7:10 - 109:12]
-// CHECK: 108:7: MemberRefExpr=first:2:23 Extent=[7:10 - 108:12]
-// CHECK: 107:7: MemberRefExpr=first:2:23 Extent=[7:10 - 107:12]
-// CHECK: 106:7: MemberRefExpr=first:2:23 Extent=[7:10 - 106:12]
-// CHECK: 105:7: MemberRefExpr=first:2:23 Extent=[7:10 - 105:12]
-// CHECK: 104:7: MemberRefExpr=first:2:23 Extent=[7:10 - 104:12]
-// CHECK: 103:7: MemberRefExpr=first:2:23 Extent=[7:10 - 103:12]
-// CHECK: 102:7: MemberRefExpr=first:2:23 Extent=[7:10 - 102:12]
-// CHECK: 101:7: MemberRefExpr=first:2:23 Extent=[7:10 - 101:12]
-// CHECK: 100:7: MemberRefExpr=first:2:23 Extent=[7:10 - 100:12]
-// CHECK: 99:7: MemberRefExpr=first:2:23 Extent=[7:10 - 99:12]
-// CHECK: 98:7: MemberRefExpr=first:2:23 Extent=[7:10 - 98:12]
-// CHECK: 97:7: MemberRefExpr=first:2:23 Extent=[7:10 - 97:12]
-// CHECK: 96:7: MemberRefExpr=first:2:23 Extent=[7:10 - 96:12]
-// CHECK: 95:7: MemberRefExpr=first:2:23 Extent=[7:10 - 95:12]
-// CHECK: 94:7: MemberRefExpr=first:2:23 Extent=[7:10 - 94:12]
-// CHECK: 93:7: MemberRefExpr=first:2:23 Extent=[7:10 - 93:12]
-// CHECK: 92:7: MemberRefExpr=first:2:23 Extent=[7:10 - 92:12]
-// CHECK: 91:7: MemberRefExpr=first:2:23 Extent=[7:10 - 91:12]
-// CHECK: 90:7: MemberRefExpr=first:2:23 Extent=[7:10 - 90:12]
-// CHECK: 89:7: MemberRefExpr=first:2:23 Extent=[7:10 - 89:12]
-// CHECK: 88:7: MemberRefExpr=first:2:23 Extent=[7:10 - 88:12]
-// CHECK: 87:7: MemberRefExpr=first:2:23 Extent=[7:10 - 87:12]
-// CHECK: 86:7: MemberRefExpr=first:2:23 Extent=[7:10 - 86:12]
-// CHECK: 85:7: MemberRefExpr=first:2:23 Extent=[7:10 - 85:12]
-// CHECK: 84:7: MemberRefExpr=first:2:23 Extent=[7:10 - 84:12]
-// CHECK: 83:7: MemberRefExpr=first:2:23 Extent=[7:10 - 83:12]
-// CHECK: 82:7: MemberRefExpr=first:2:23 Extent=[7:10 - 82:12]
-// CHECK: 81:7: MemberRefExpr=first:2:23 Extent=[7:10 - 81:12]
-// CHECK: 80:7: MemberRefExpr=first:2:23 Extent=[7:10 - 80:12]
-// CHECK: 79:7: MemberRefExpr=first:2:23 Extent=[7:10 - 79:12]
-// CHECK: 78:7: MemberRefExpr=first:2:23 Extent=[7:10 - 78:12]
-// CHECK: 77:7: MemberRefExpr=first:2:23 Extent=[7:10 - 77:12]
-// CHECK: 76:7: MemberRefExpr=first:2:23 Extent=[7:10 - 76:12]
-// CHECK: 75:7: MemberRefExpr=first:2:23 Extent=[7:10 - 75:12]
-// CHECK: 74:7: MemberRefExpr=first:2:23 Extent=[7:10 - 74:12]
-// CHECK: 73:7: MemberRefExpr=first:2:23 Extent=[7:10 - 73:12]
-// CHECK: 72:7: MemberRefExpr=first:2:23 Extent=[7:10 - 72:12]
-// CHECK: 71:7: MemberRefExpr=first:2:23 Extent=[7:10 - 71:12]
-// CHECK: 70:7: MemberRefExpr=first:2:23 Extent=[7:10 - 70:12]
-// CHECK: 69:7: MemberRefExpr=first:2:23 Extent=[7:10 - 69:12]
-// CHECK: 68:7: MemberRefExpr=first:2:23 Extent=[7:10 - 68:12]
-// CHECK: 67:7: MemberRefExpr=first:2:23 Extent=[7:10 - 67:12]
-// CHECK: 66:7: MemberRefExpr=first:2:23 Extent=[7:10 - 66:12]
-// CHECK: 65:7: MemberRefExpr=first:2:23 Extent=[7:10 - 65:12]
-// CHECK: 64:7: MemberRefExpr=first:2:23 Extent=[7:10 - 64:12]
-// CHECK: 63:7: MemberRefExpr=first:2:23 Extent=[7:10 - 63:12]
-// CHECK: 62:7: MemberRefExpr=first:2:23 Extent=[7:10 - 62:12]
-// CHECK: 61:7: MemberRefExpr=first:2:23 Extent=[7:10 - 61:12]
-// CHECK: 60:7: MemberRefExpr=first:2:23 Extent=[7:10 - 60:12]
-// CHECK: 59:7: MemberRefExpr=first:2:23 Extent=[7:10 - 59:12]
-// CHECK: 58:7: MemberRefExpr=first:2:23 Extent=[7:10 - 58:12]
-// CHECK: 57:7: MemberRefExpr=first:2:23 Extent=[7:10 - 57:12]
-// CHECK: 56:7: MemberRefExpr=first:2:23 Extent=[7:10 - 56:12]
-// CHECK: 55:7: MemberRefExpr=first:2:23 Extent=[7:10 - 55:12]
-// CHECK: 54:7: MemberRefExpr=first:2:23 Extent=[7:10 - 54:12]
-// CHECK: 53:7: MemberRefExpr=first:2:23 Extent=[7:10 - 53:12]
-// CHECK: 52:7: MemberRefExpr=first:2:23 Extent=[7:10 - 52:12]
-// CHECK: 51:7: MemberRefExpr=first:2:23 Extent=[7:10 - 51:12]
-// CHECK: 50:7: MemberRefExpr=first:2:23 Extent=[7:10 - 50:12]
-// CHECK: 49:7: MemberRefExpr=first:2:23 Extent=[7:10 - 49:12]
-// CHECK: 48:7: MemberRefExpr=first:2:23 Extent=[7:10 - 48:12]
-// CHECK: 47:7: MemberRefExpr=first:2:23 Extent=[7:10 - 47:12]
-// CHECK: 46:7: MemberRefExpr=first:2:23 Extent=[7:10 - 46:12]
-// CHECK: 45:7: MemberRefExpr=first:2:23 Extent=[7:10 - 45:12]
-// CHECK: 44:7: MemberRefExpr=first:2:23 Extent=[7:10 - 44:12]
-// CHECK: 43:7: MemberRefExpr=first:2:23 Extent=[7:10 - 43:12]
-// CHECK: 42:7: MemberRefExpr=first:2:23 Extent=[7:10 - 42:12]
-// CHECK: 41:7: MemberRefExpr=first:2:23 Extent=[7:10 - 41:12]
-// CHECK: 40:7: MemberRefExpr=first:2:23 Extent=[7:10 - 40:12]
-// CHECK: 39:7: MemberRefExpr=first:2:23 Extent=[7:10 - 39:12]
-// CHECK: 38:7: MemberRefExpr=first:2:23 Extent=[7:10 - 38:12]
-// CHECK: 37:7: MemberRefExpr=first:2:23 Extent=[7:10 - 37:12]
-// CHECK: 36:7: MemberRefExpr=first:2:23 Extent=[7:10 - 36:12]
-// CHECK: 35:7: MemberRefExpr=first:2:23 Extent=[7:10 - 35:12]
-// CHECK: 34:7: MemberRefExpr=first:2:23 Extent=[7:10 - 34:12]
-// CHECK: 33:7: MemberRefExpr=first:2:23 Extent=[7:10 - 33:12]
-// CHECK: 32:7: MemberRefExpr=first:2:23 Extent=[7:10 - 32:12]
-// CHECK: 31:7: MemberRefExpr=first:2:23 Extent=[7:10 - 31:12]
-// CHECK: 30:7: MemberRefExpr=first:2:23 Extent=[7:10 - 30:12]
-// CHECK: 29:7: MemberRefExpr=first:2:23 Extent=[7:10 - 29:12]
-// CHECK: 28:7: MemberRefExpr=first:2:23 Extent=[7:10 - 28:12]
-// CHECK: 27:7: MemberRefExpr=first:2:23 Extent=[7:10 - 27:12]
-// CHECK: 26:7: MemberRefExpr=first:2:23 Extent=[7:10 - 26:12]
-// CHECK: 25:7: MemberRefExpr=first:2:23 Extent=[7:10 - 25:12]
-// CHECK: 24:7: MemberRefExpr=first:2:23 Extent=[7:10 - 24:12]
-// CHECK: 23:7: MemberRefExpr=first:2:23 Extent=[7:10 - 23:12]
-// CHECK: 22:7: MemberRefExpr=first:2:23 Extent=[7:10 - 22:12]
-// CHECK: 21:7: MemberRefExpr=first:2:23 Extent=[7:10 - 21:12]
-// CHECK: 20:7: MemberRefExpr=first:2:23 Extent=[7:10 - 20:12]
-// CHECK: 19:7: MemberRefExpr=first:2:23 Extent=[7:10 - 19:12]
-// CHECK: 18:7: MemberRefExpr=first:2:23 Extent=[7:10 - 18:12]
-// CHECK: 17:7: MemberRefExpr=first:2:23 Extent=[7:10 - 17:12]
-// CHECK: 16:7: MemberRefExpr=first:2:23 Extent=[7:10 - 16:12]
-// CHECK: 15:7: MemberRefExpr=first:2:23 Extent=[7:10 - 15:12]
-// CHECK: 14:7: MemberRefExpr=first:2:23 Extent=[7:10 - 14:12]
-// CHECK: 13:7: MemberRefExpr=first:2:23 Extent=[7:10 - 13:12]
-// CHECK: 12:7: MemberRefExpr=first:2:23 Extent=[7:10 - 12:12]
-// CHECK: 11:7: MemberRefExpr=first:2:23 Extent=[7:11 - 11:12]
-// CHECK: 10:7: MemberRefExpr=first:2:23 Extent=[7:12 - 10:12]
-// CHECK: 9:7: MemberRefExpr=first:2:23 Extent=[7:13 - 9:12]
-// CHECK: 8:7: MemberRefExpr=first:2:23 Extent=[7:14 - 8:12]
-// CHECK: 7:27: MemberRefExpr=first:2:23 Extent=[7:15 - 7:32]
-// CHECK: 7:19: MemberRefExpr=first:2:23 Extent=[7:16 - 7:24]
+// CHECK: 123:7: MemberRefExpr=x:3:7 SingleRefName=[123:7 - 123:8] RefName=[123:7 - 123:8] Extent=[7:10 - 123:8]
+// CHECK: 122:7: MemberRefExpr=first:2:23 SingleRefName=[122:7 - 122:12] RefName=[122:7 - 122:12] Extent=[7:10 - 122:12]
+// CHECK: 121:7: MemberRefExpr=first:2:23 SingleRefName=[121:7 - 121:12] RefName=[121:7 - 121:12] Extent=[7:10 - 121:12]
+// CHECK: 120:7: MemberRefExpr=first:2:23 SingleRefName=[120:7 - 120:12] RefName=[120:7 - 120:12] Extent=[7:10 - 120:12]
+// CHECK: 119:7: MemberRefExpr=first:2:23 SingleRefName=[119:7 - 119:12] RefName=[119:7 - 119:12] Extent=[7:10 - 119:12]
+// CHECK: 118:7: MemberRefExpr=first:2:23 SingleRefName=[118:7 - 118:12] RefName=[118:7 - 118:12] Extent=[7:10 - 118:12]
+// CHECK: 117:7: MemberRefExpr=first:2:23 SingleRefName=[117:7 - 117:12] RefName=[117:7 - 117:12] Extent=[7:10 - 117:12]
+// CHECK: 116:7: MemberRefExpr=first:2:23 SingleRefName=[116:7 - 116:12] RefName=[116:7 - 116:12] Extent=[7:10 - 116:12]
+// CHECK: 115:7: MemberRefExpr=first:2:23 SingleRefName=[115:7 - 115:12] RefName=[115:7 - 115:12] Extent=[7:10 - 115:12]
+// CHECK: 114:7: MemberRefExpr=first:2:23 SingleRefName=[114:7 - 114:12] RefName=[114:7 - 114:12] Extent=[7:10 - 114:12]
+// CHECK: 113:7: MemberRefExpr=first:2:23 SingleRefName=[113:7 - 113:12] RefName=[113:7 - 113:12] Extent=[7:10 - 113:12]
+// CHECK: 112:7: MemberRefExpr=first:2:23 SingleRefName=[112:7 - 112:12] RefName=[112:7 - 112:12] Extent=[7:10 - 112:12]
+// CHECK: 111:7: MemberRefExpr=first:2:23 SingleRefName=[111:7 - 111:12] RefName=[111:7 - 111:12] Extent=[7:10 - 111:12]
+// CHECK: 110:7: MemberRefExpr=first:2:23 SingleRefName=[110:7 - 110:12] RefName=[110:7 - 110:12] Extent=[7:10 - 110:12]
+// CHECK: 109:7: MemberRefExpr=first:2:23 SingleRefName=[109:7 - 109:12] RefName=[109:7 - 109:12] Extent=[7:10 - 109:12]
+// CHECK: 108:7: MemberRefExpr=first:2:23 SingleRefName=[108:7 - 108:12] RefName=[108:7 - 108:12] Extent=[7:10 - 108:12]
+// CHECK: 107:7: MemberRefExpr=first:2:23 SingleRefName=[107:7 - 107:12] RefName=[107:7 - 107:12] Extent=[7:10 - 107:12]
+// CHECK: 106:7: MemberRefExpr=first:2:23 SingleRefName=[106:7 - 106:12] RefName=[106:7 - 106:12] Extent=[7:10 - 106:12]
+// CHECK: 105:7: MemberRefExpr=first:2:23 SingleRefName=[105:7 - 105:12] RefName=[105:7 - 105:12] Extent=[7:10 - 105:12]
+// CHECK: 104:7: MemberRefExpr=first:2:23 SingleRefName=[104:7 - 104:12] RefName=[104:7 - 104:12] Extent=[7:10 - 104:12]
+// CHECK: 103:7: MemberRefExpr=first:2:23 SingleRefName=[103:7 - 103:12] RefName=[103:7 - 103:12] Extent=[7:10 - 103:12]
+// CHECK: 102:7: MemberRefExpr=first:2:23 SingleRefName=[102:7 - 102:12] RefName=[102:7 - 102:12] Extent=[7:10 - 102:12]
+// CHECK: 101:7: MemberRefExpr=first:2:23 SingleRefName=[101:7 - 101:12] RefName=[101:7 - 101:12] Extent=[7:10 - 101:12]
+// CHECK: 100:7: MemberRefExpr=first:2:23 SingleRefName=[100:7 - 100:12] RefName=[100:7 - 100:12] Extent=[7:10 - 100:12]
+// CHECK: 99:7: MemberRefExpr=first:2:23 SingleRefName=[99:7 - 99:12] RefName=[99:7 - 99:12] Extent=[7:10 - 99:12]
+// CHECK: 98:7: MemberRefExpr=first:2:23 SingleRefName=[98:7 - 98:12] RefName=[98:7 - 98:12] Extent=[7:10 - 98:12]
+// CHECK: 97:7: MemberRefExpr=first:2:23 SingleRefName=[97:7 - 97:12] RefName=[97:7 - 97:12] Extent=[7:10 - 97:12]
+// CHECK: 96:7: MemberRefExpr=first:2:23 SingleRefName=[96:7 - 96:12] RefName=[96:7 - 96:12] Extent=[7:10 - 96:12]
+// CHECK: 95:7: MemberRefExpr=first:2:23 SingleRefName=[95:7 - 95:12] RefName=[95:7 - 95:12] Extent=[7:10 - 95:12]
+// CHECK: 94:7: MemberRefExpr=first:2:23 SingleRefName=[94:7 - 94:12] RefName=[94:7 - 94:12] Extent=[7:10 - 94:12]
+// CHECK: 93:7: MemberRefExpr=first:2:23 SingleRefName=[93:7 - 93:12] RefName=[93:7 - 93:12] Extent=[7:10 - 93:12]
+// CHECK: 92:7: MemberRefExpr=first:2:23 SingleRefName=[92:7 - 92:12] RefName=[92:7 - 92:12] Extent=[7:10 - 92:12]
+// CHECK: 91:7: MemberRefExpr=first:2:23 SingleRefName=[91:7 - 91:12] RefName=[91:7 - 91:12] Extent=[7:10 - 91:12]
+// CHECK: 90:7: MemberRefExpr=first:2:23 SingleRefName=[90:7 - 90:12] RefName=[90:7 - 90:12] Extent=[7:10 - 90:12]
+// CHECK: 89:7: MemberRefExpr=first:2:23 SingleRefName=[89:7 - 89:12] RefName=[89:7 - 89:12] Extent=[7:10 - 89:12]
+// CHECK: 88:7: MemberRefExpr=first:2:23 SingleRefName=[88:7 - 88:12] RefName=[88:7 - 88:12] Extent=[7:10 - 88:12]
+// CHECK: 87:7: MemberRefExpr=first:2:23 SingleRefName=[87:7 - 87:12] RefName=[87:7 - 87:12] Extent=[7:10 - 87:12]
+// CHECK: 86:7: MemberRefExpr=first:2:23 SingleRefName=[86:7 - 86:12] RefName=[86:7 - 86:12] Extent=[7:10 - 86:12]
+// CHECK: 85:7: MemberRefExpr=first:2:23 SingleRefName=[85:7 - 85:12] RefName=[85:7 - 85:12] Extent=[7:10 - 85:12]
+// CHECK: 84:7: MemberRefExpr=first:2:23 SingleRefName=[84:7 - 84:12] RefName=[84:7 - 84:12] Extent=[7:10 - 84:12]
+// CHECK: 83:7: MemberRefExpr=first:2:23 SingleRefName=[83:7 - 83:12] RefName=[83:7 - 83:12] Extent=[7:10 - 83:12]
+// CHECK: 82:7: MemberRefExpr=first:2:23 SingleRefName=[82:7 - 82:12] RefName=[82:7 - 82:12] Extent=[7:10 - 82:12]
+// CHECK: 81:7: MemberRefExpr=first:2:23 SingleRefName=[81:7 - 81:12] RefName=[81:7 - 81:12] Extent=[7:10 - 81:12]
+// CHECK: 80:7: MemberRefExpr=first:2:23 SingleRefName=[80:7 - 80:12] RefName=[80:7 - 80:12] Extent=[7:10 - 80:12]
+// CHECK: 79:7: MemberRefExpr=first:2:23 SingleRefName=[79:7 - 79:12] RefName=[79:7 - 79:12] Extent=[7:10 - 79:12]
+// CHECK: 78:7: MemberRefExpr=first:2:23 SingleRefName=[78:7 - 78:12] RefName=[78:7 - 78:12] Extent=[7:10 - 78:12]
+// CHECK: 77:7: MemberRefExpr=first:2:23 SingleRefName=[77:7 - 77:12] RefName=[77:7 - 77:12] Extent=[7:10 - 77:12]
+// CHECK: 76:7: MemberRefExpr=first:2:23 SingleRefName=[76:7 - 76:12] RefName=[76:7 - 76:12] Extent=[7:10 - 76:12]
+// CHECK: 75:7: MemberRefExpr=first:2:23 SingleRefName=[75:7 - 75:12] RefName=[75:7 - 75:12] Extent=[7:10 - 75:12]
+// CHECK: 74:7: MemberRefExpr=first:2:23 SingleRefName=[74:7 - 74:12] RefName=[74:7 - 74:12] Extent=[7:10 - 74:12]
+// CHECK: 73:7: MemberRefExpr=first:2:23 SingleRefName=[73:7 - 73:12] RefName=[73:7 - 73:12] Extent=[7:10 - 73:12]
+// CHECK: 72:7: MemberRefExpr=first:2:23 SingleRefName=[72:7 - 72:12] RefName=[72:7 - 72:12] Extent=[7:10 - 72:12]
+// CHECK: 71:7: MemberRefExpr=first:2:23 SingleRefName=[71:7 - 71:12] RefName=[71:7 - 71:12] Extent=[7:10 - 71:12]
+// CHECK: 70:7: MemberRefExpr=first:2:23 SingleRefName=[70:7 - 70:12] RefName=[70:7 - 70:12] Extent=[7:10 - 70:12]
+// CHECK: 69:7: MemberRefExpr=first:2:23 SingleRefName=[69:7 - 69:12] RefName=[69:7 - 69:12] Extent=[7:10 - 69:12]
+// CHECK: 68:7: MemberRefExpr=first:2:23 SingleRefName=[68:7 - 68:12] RefName=[68:7 - 68:12] Extent=[7:10 - 68:12]
+// CHECK: 67:7: MemberRefExpr=first:2:23 SingleRefName=[67:7 - 67:12] RefName=[67:7 - 67:12] Extent=[7:10 - 67:12]
+// CHECK: 66:7: MemberRefExpr=first:2:23 SingleRefName=[66:7 - 66:12] RefName=[66:7 - 66:12] Extent=[7:10 - 66:12]
+// CHECK: 65:7: MemberRefExpr=first:2:23 SingleRefName=[65:7 - 65:12] RefName=[65:7 - 65:12] Extent=[7:10 - 65:12]
+// CHECK: 64:7: MemberRefExpr=first:2:23 SingleRefName=[64:7 - 64:12] RefName=[64:7 - 64:12] Extent=[7:10 - 64:12]
+// CHECK: 63:7: MemberRefExpr=first:2:23 SingleRefName=[63:7 - 63:12] RefName=[63:7 - 63:12] Extent=[7:10 - 63:12]
+// CHECK: 62:7: MemberRefExpr=first:2:23 SingleRefName=[62:7 - 62:12] RefName=[62:7 - 62:12] Extent=[7:10 - 62:12]
+// CHECK: 61:7: MemberRefExpr=first:2:23 SingleRefName=[61:7 - 61:12] RefName=[61:7 - 61:12] Extent=[7:10 - 61:12]
+// CHECK: 60:7: MemberRefExpr=first:2:23 SingleRefName=[60:7 - 60:12] RefName=[60:7 - 60:12] Extent=[7:10 - 60:12]
+// CHECK: 59:7: MemberRefExpr=first:2:23 SingleRefName=[59:7 - 59:12] RefName=[59:7 - 59:12] Extent=[7:10 - 59:12]
+// CHECK: 58:7: MemberRefExpr=first:2:23 SingleRefName=[58:7 - 58:12] RefName=[58:7 - 58:12] Extent=[7:10 - 58:12]
+// CHECK: 57:7: MemberRefExpr=first:2:23 SingleRefName=[57:7 - 57:12] RefName=[57:7 - 57:12] Extent=[7:10 - 57:12]
+// CHECK: 56:7: MemberRefExpr=first:2:23 SingleRefName=[56:7 - 56:12] RefName=[56:7 - 56:12] Extent=[7:10 - 56:12]
+// CHECK: 55:7: MemberRefExpr=first:2:23 SingleRefName=[55:7 - 55:12] RefName=[55:7 - 55:12] Extent=[7:10 - 55:12]
+// CHECK: 54:7: MemberRefExpr=first:2:23 SingleRefName=[54:7 - 54:12] RefName=[54:7 - 54:12] Extent=[7:10 - 54:12]
+// CHECK: 53:7: MemberRefExpr=first:2:23 SingleRefName=[53:7 - 53:12] RefName=[53:7 - 53:12] Extent=[7:10 - 53:12]
+// CHECK: 52:7: MemberRefExpr=first:2:23 SingleRefName=[52:7 - 52:12] RefName=[52:7 - 52:12] Extent=[7:10 - 52:12]
+// CHECK: 51:7: MemberRefExpr=first:2:23 SingleRefName=[51:7 - 51:12] RefName=[51:7 - 51:12] Extent=[7:10 - 51:12]
+// CHECK: 50:7: MemberRefExpr=first:2:23 SingleRefName=[50:7 - 50:12] RefName=[50:7 - 50:12] Extent=[7:10 - 50:12]
+// CHECK: 49:7: MemberRefExpr=first:2:23 SingleRefName=[49:7 - 49:12] RefName=[49:7 - 49:12] Extent=[7:10 - 49:12]
+// CHECK: 48:7: MemberRefExpr=first:2:23 SingleRefName=[48:7 - 48:12] RefName=[48:7 - 48:12] Extent=[7:10 - 48:12]
+// CHECK: 47:7: MemberRefExpr=first:2:23 SingleRefName=[47:7 - 47:12] RefName=[47:7 - 47:12] Extent=[7:10 - 47:12]
+// CHECK: 46:7: MemberRefExpr=first:2:23 SingleRefName=[46:7 - 46:12] RefName=[46:7 - 46:12] Extent=[7:10 - 46:12]
+// CHECK: 45:7: MemberRefExpr=first:2:23 SingleRefName=[45:7 - 45:12] RefName=[45:7 - 45:12] Extent=[7:10 - 45:12]
+// CHECK: 44:7: MemberRefExpr=first:2:23 SingleRefName=[44:7 - 44:12] RefName=[44:7 - 44:12] Extent=[7:10 - 44:12]
+// CHECK: 43:7: MemberRefExpr=first:2:23 SingleRefName=[43:7 - 43:12] RefName=[43:7 - 43:12] Extent=[7:10 - 43:12]
+// CHECK: 42:7: MemberRefExpr=first:2:23 SingleRefName=[42:7 - 42:12] RefName=[42:7 - 42:12] Extent=[7:10 - 42:12]
+// CHECK: 41:7: MemberRefExpr=first:2:23 SingleRefName=[41:7 - 41:12] RefName=[41:7 - 41:12] Extent=[7:10 - 41:12]
+// CHECK: 40:7: MemberRefExpr=first:2:23 SingleRefName=[40:7 - 40:12] RefName=[40:7 - 40:12] Extent=[7:10 - 40:12]
+// CHECK: 39:7: MemberRefExpr=first:2:23 SingleRefName=[39:7 - 39:12] RefName=[39:7 - 39:12] Extent=[7:10 - 39:12]
+// CHECK: 38:7: MemberRefExpr=first:2:23 SingleRefName=[38:7 - 38:12] RefName=[38:7 - 38:12] Extent=[7:10 - 38:12]
+// CHECK: 37:7: MemberRefExpr=first:2:23 SingleRefName=[37:7 - 37:12] RefName=[37:7 - 37:12] Extent=[7:10 - 37:12]
+// CHECK: 36:7: MemberRefExpr=first:2:23 SingleRefName=[36:7 - 36:12] RefName=[36:7 - 36:12] Extent=[7:10 - 36:12]
+// CHECK: 35:7: MemberRefExpr=first:2:23 SingleRefName=[35:7 - 35:12] RefName=[35:7 - 35:12] Extent=[7:10 - 35:12]
+// CHECK: 34:7: MemberRefExpr=first:2:23 SingleRefName=[34:7 - 34:12] RefName=[34:7 - 34:12] Extent=[7:10 - 34:12]
+// CHECK: 33:7: MemberRefExpr=first:2:23 SingleRefName=[33:7 - 33:12] RefName=[33:7 - 33:12] Extent=[7:10 - 33:12]
+// CHECK: 32:7: MemberRefExpr=first:2:23 SingleRefName=[32:7 - 32:12] RefName=[32:7 - 32:12] Extent=[7:10 - 32:12]
+// CHECK: 31:7: MemberRefExpr=first:2:23 SingleRefName=[31:7 - 31:12] RefName=[31:7 - 31:12] Extent=[7:10 - 31:12]
+// CHECK: 30:7: MemberRefExpr=first:2:23 SingleRefName=[30:7 - 30:12] RefName=[30:7 - 30:12] Extent=[7:10 - 30:12]
+// CHECK: 29:7: MemberRefExpr=first:2:23 SingleRefName=[29:7 - 29:12] RefName=[29:7 - 29:12] Extent=[7:10 - 29:12]
+// CHECK: 28:7: MemberRefExpr=first:2:23 SingleRefName=[28:7 - 28:12] RefName=[28:7 - 28:12] Extent=[7:10 - 28:12]
+// CHECK: 27:7: MemberRefExpr=first:2:23 SingleRefName=[27:7 - 27:12] RefName=[27:7 - 27:12] Extent=[7:10 - 27:12]
+// CHECK: 26:7: MemberRefExpr=first:2:23 SingleRefName=[26:7 - 26:12] RefName=[26:7 - 26:12] Extent=[7:10 - 26:12]
+// CHECK: 25:7: MemberRefExpr=first:2:23 SingleRefName=[25:7 - 25:12] RefName=[25:7 - 25:12] Extent=[7:10 - 25:12]
+// CHECK: 24:7: MemberRefExpr=first:2:23 SingleRefName=[24:7 - 24:12] RefName=[24:7 - 24:12] Extent=[7:10 - 24:12]
+// CHECK: 23:7: MemberRefExpr=first:2:23 SingleRefName=[23:7 - 23:12] RefName=[23:7 - 23:12] Extent=[7:10 - 23:12]
+// CHECK: 22:7: MemberRefExpr=first:2:23 SingleRefName=[22:7 - 22:12] RefName=[22:7 - 22:12] Extent=[7:10 - 22:12]
+// CHECK: 21:7: MemberRefExpr=first:2:23 SingleRefName=[21:7 - 21:12] RefName=[21:7 - 21:12] Extent=[7:10 - 21:12]
+// CHECK: 20:7: MemberRefExpr=first:2:23 SingleRefName=[20:7 - 20:12] RefName=[20:7 - 20:12] Extent=[7:10 - 20:12]
+// CHECK: 19:7: MemberRefExpr=first:2:23 SingleRefName=[19:7 - 19:12] RefName=[19:7 - 19:12] Extent=[7:10 - 19:12]
+// CHECK: 18:7: MemberRefExpr=first:2:23 SingleRefName=[18:7 - 18:12] RefName=[18:7 - 18:12] Extent=[7:10 - 18:12]
+// CHECK: 17:7: MemberRefExpr=first:2:23 SingleRefName=[17:7 - 17:12] RefName=[17:7 - 17:12] Extent=[7:10 - 17:12]
+// CHECK: 16:7: MemberRefExpr=first:2:23 SingleRefName=[16:7 - 16:12] RefName=[16:7 - 16:12] Extent=[7:10 - 16:12]
+// CHECK: 15:7: MemberRefExpr=first:2:23 SingleRefName=[15:7 - 15:12] RefName=[15:7 - 15:12] Extent=[7:10 - 15:12]
+// CHECK: 14:7: MemberRefExpr=first:2:23 SingleRefName=[14:7 - 14:12] RefName=[14:7 - 14:12] Extent=[7:10 - 14:12]
+// CHECK: 13:7: MemberRefExpr=first:2:23 SingleRefName=[13:7 - 13:12] RefName=[13:7 - 13:12] Extent=[7:10 - 13:12]
+// CHECK: 12:7: MemberRefExpr=first:2:23 SingleRefName=[12:7 - 12:12] RefName=[12:7 - 12:12] Extent=[7:10 - 12:12]
+// CHECK: 11:7: MemberRefExpr=first:2:23 SingleRefName=[11:7 - 11:12] RefName=[11:7 - 11:12] Extent=[7:11 - 11:12]
+// CHECK: 10:7: MemberRefExpr=first:2:23 SingleRefName=[10:7 - 10:12] RefName=[10:7 - 10:12] Extent=[7:12 - 10:12]
+// CHECK: 9:7: MemberRefExpr=first:2:23 SingleRefName=[9:7 - 9:12] RefName=[9:7 - 9:12] Extent=[7:13 - 9:12]
+// CHECK: 8:7: MemberRefExpr=first:2:23 SingleRefName=[8:7 - 8:12] RefName=[8:7 - 8:12] Extent=[7:14 - 8:12]
+// CHECK: 7:27: MemberRefExpr=first:2:23 SingleRefName=[7:27 - 7:32] RefName=[7:27 - 7:32] Extent=[7:15 - 7:32]
+// CHECK: 7:19: MemberRefExpr=first:2:23 SingleRefName=[7:19 - 7:24] RefName=[7:19 - 7:24] Extent=[7:16 - 7:24]
 // CHECK: 7:16: DeclRefExpr=s:6:42 Extent=[7:16 - 7:17]
 
 // RUN: c-index-test -test-annotate-tokens=%s:1:1:124:1 %s | FileCheck -check-prefix=CHECK-tokens %s

Modified: cfe/trunk/tools/c-index-test/c-index-test.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/c-index-test.c?rev=135920&r1=135919&r2=135920&view=diff
==============================================================================
--- cfe/trunk/tools/c-index-test/c-index-test.c (original)
+++ cfe/trunk/tools/c-index-test/c-index-test.c Mon Jul 25 12:48:11 2011
@@ -158,6 +158,21 @@
 /* Pretty-printing.                                                           */
 /******************************************************************************/
 
+static void PrintRange(CXSourceRange R, const char *str) {
+  CXFile begin_file, end_file;
+  unsigned begin_line, begin_column, end_line, end_column;
+
+  clang_getSpellingLocation(clang_getRangeStart(R),
+                            &begin_file, &begin_line, &begin_column, 0);
+  clang_getSpellingLocation(clang_getRangeEnd(R),
+                            &end_file, &end_line, &end_column, 0);
+  if (!begin_file || !end_file)
+    return;
+
+  printf(" %s=", str);
+  PrintExtent(stdout, begin_line, begin_column, end_line, end_column);
+}
+
 int want_display_name = 0;
 
 static void PrintCursor(CXTranslationUnit TU, CXCursor Cursor) {
@@ -173,6 +188,9 @@
     CXCursor SpecializationOf;
     CXCursor *overridden;
     unsigned num_overridden;
+    unsigned RefNameRangeNr;
+    CXSourceRange CursorExtent;
+    CXSourceRange RefNameRange;
 
     ks = clang_getCursorKindSpelling(Cursor.kind);
     string = want_display_name? clang_getCursorDisplayName(Cursor) 
@@ -288,6 +306,26 @@
       if (clang_isFileMultipleIncludeGuarded(TU, File))
         printf("  [multi-include guarded]");
     }
+    
+    CursorExtent = clang_getCursorExtent(Cursor);
+    RefNameRange = clang_getCursorReferenceNameRange(Cursor, 
+                                                   CXNameRange_WantQualifier
+                                                 | CXNameRange_WantSinglePiece
+                                                 | CXNameRange_WantTemplateArgs,
+                                                     0);
+    if (!clang_equalRanges(CursorExtent, RefNameRange))
+      PrintRange(RefNameRange, "SingleRefName");
+    
+    for (RefNameRangeNr = 0; 1; RefNameRangeNr++) {
+      RefNameRange = clang_getCursorReferenceNameRange(Cursor, 
+                                                   CXNameRange_WantQualifier
+                                                 | CXNameRange_WantTemplateArgs,
+                                                       RefNameRangeNr);
+      if (clang_equalRanges(clang_getNullRange(), RefNameRange))
+        break;
+      if (!clang_equalRanges(CursorExtent, RefNameRange))
+        PrintRange(RefNameRange, "RefName");
+    }
   }
 }
 
@@ -405,18 +443,7 @@
 
 static void PrintCursorExtent(CXCursor C) {
   CXSourceRange extent = clang_getCursorExtent(C);
-  CXFile begin_file, end_file;
-  unsigned begin_line, begin_column, end_line, end_column;
-
-  clang_getSpellingLocation(clang_getRangeStart(extent),
-                            &begin_file, &begin_line, &begin_column, 0);
-  clang_getSpellingLocation(clang_getRangeEnd(extent),
-                            &end_file, &end_line, &end_column, 0);
-  if (!begin_file || !end_file)
-    return;
-
-  printf(" Extent=");
-  PrintExtent(stdout, begin_line, begin_column, end_line, end_column);
+  PrintRange(extent, "Extent");
 }
 
 /* Data used by all of the visitors. */

Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=135920&r1=135919&r2=135920&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Mon Jul 25 12:48:11 2011
@@ -4253,6 +4253,94 @@
   *endColumn = SM.getSpellingColumnNumber(Body->getRBracLoc());
 }
 
+namespace {
+typedef llvm::SmallVector<SourceRange, 4> RefNamePieces;
+RefNamePieces buildPieces(unsigned NameFlags, bool IsMemberRefExpr, 
+                          const DeclarationNameInfo &NI, 
+                          const SourceRange &QLoc, 
+                          const ExplicitTemplateArgumentList *TemplateArgs = 0){
+  const bool WantQualifier = NameFlags & CXNameRange_WantQualifier;
+  const bool WantTemplateArgs = NameFlags & CXNameRange_WantTemplateArgs;
+  const bool WantSinglePiece = NameFlags & CXNameRange_WantSinglePiece;
+  
+  const DeclarationName::NameKind Kind = NI.getName().getNameKind();
+  
+  RefNamePieces Pieces;
+
+  if (WantQualifier && QLoc.isValid())
+    Pieces.push_back(QLoc);
+  
+  if (Kind != DeclarationName::CXXOperatorName || IsMemberRefExpr)
+    Pieces.push_back(NI.getLoc());
+  
+  if (WantTemplateArgs && TemplateArgs)
+    Pieces.push_back(SourceRange(TemplateArgs->LAngleLoc,
+                                 TemplateArgs->RAngleLoc));
+  
+  if (Kind == DeclarationName::CXXOperatorName) {
+    Pieces.push_back(SourceLocation::getFromRawEncoding(
+                       NI.getInfo().CXXOperatorName.BeginOpNameLoc));
+    Pieces.push_back(SourceLocation::getFromRawEncoding(
+                       NI.getInfo().CXXOperatorName.EndOpNameLoc));
+  }
+  
+  if (WantSinglePiece) {
+    SourceRange R(Pieces.front().getBegin(), Pieces.back().getEnd());
+    Pieces.clear();
+    Pieces.push_back(R);
+  }  
+
+  return Pieces;  
+}
+}
+
+CXSourceRange clang_getCursorReferenceNameRange(CXCursor C, unsigned NameFlags,
+                                                unsigned PieceIndex) {
+  RefNamePieces Pieces;
+  
+  switch (C.kind) {
+  case CXCursor_MemberRefExpr:
+    if (MemberExpr *E = dyn_cast<MemberExpr>(getCursorExpr(C)))
+      Pieces = buildPieces(NameFlags, true, E->getMemberNameInfo(),
+                           E->getQualifierLoc().getSourceRange());
+    break;
+  
+  case CXCursor_DeclRefExpr:
+    if (DeclRefExpr *E = dyn_cast<DeclRefExpr>(getCursorExpr(C)))
+      Pieces = buildPieces(NameFlags, false, E->getNameInfo(), 
+                           E->getQualifierLoc().getSourceRange(),
+                           E->getExplicitTemplateArgsOpt());
+    break;
+    
+  case CXCursor_CallExpr:
+    if (CXXOperatorCallExpr *OCE = 
+        dyn_cast<CXXOperatorCallExpr>(getCursorExpr(C))) {
+      Expr *Callee = OCE->getCallee();
+      if (ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Callee))
+        Callee = ICE->getSubExpr();
+
+      if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Callee))
+        Pieces = buildPieces(NameFlags, false, DRE->getNameInfo(),
+                             DRE->getQualifierLoc().getSourceRange());
+    }
+    break;
+    
+  default:
+    break;
+  }
+
+  if (Pieces.empty()) {
+    if (PieceIndex == 0)
+      return clang_getCursorExtent(C);
+  } else if (PieceIndex < Pieces.size()) {
+      SourceRange R = Pieces[PieceIndex];
+      if (R.isValid())
+        return cxloc::translateSourceRange(getCursorContext(C), R);
+  }
+  
+  return clang_getNullRange();
+}
+
 void clang_enableStackTraces(void) {
   llvm::sys::PrintStackTraceOnErrorSignal();
 }

Modified: cfe/trunk/tools/libclang/libclang.darwin.exports
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/libclang.darwin.exports?rev=135920&r1=135919&r2=135920&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/libclang.darwin.exports (original)
+++ cfe/trunk/tools/libclang/libclang.darwin.exports Mon Jul 25 12:48:11 2011
@@ -2,6 +2,7 @@
 _clang_CXCursorSet_insert
 _clang_CXXMethod_isStatic
 _clang_CXXMethod_isVirtual
+_clang_getCursorReferenceNameRange
 _clang_annotateTokens
 _clang_codeCompleteAt
 _clang_codeCompleteGetDiagnostic

Modified: cfe/trunk/tools/libclang/libclang.exports
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/libclang.exports?rev=135920&r1=135919&r2=135920&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/libclang.exports (original)
+++ cfe/trunk/tools/libclang/libclang.exports Mon Jul 25 12:48:11 2011
@@ -2,6 +2,7 @@
 clang_CXCursorSet_insert
 clang_CXXMethod_isStatic
 clang_CXXMethod_isVirtual
+clang_getCursorReferenceNameRange
 clang_annotateTokens
 clang_codeCompleteAt
 clang_codeCompleteGetDiagnostic





More information about the cfe-commits mailing list