[cfe-commits] r80359 - in /cfe/trunk: include/clang-c/Index.h tools/CIndex/CIndex.cpp

Steve Naroff snaroff at apple.com
Fri Aug 28 05:07:44 PDT 2009


Author: snaroff
Date: Fri Aug 28 07:07:44 2009
New Revision: 80359

URL: http://llvm.org/viewvc/llvm-project?rev=80359&view=rev
Log:
Add CX prefix to Cursor and move a comment.

Modified:
    cfe/trunk/include/clang-c/Index.h
    cfe/trunk/tools/CIndex/CIndex.cpp

Modified: cfe/trunk/include/clang-c/Index.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/Index.h?rev=80359&r1=80358&r2=80359&view=diff

==============================================================================
--- cfe/trunk/include/clang-c/Index.h (original)
+++ cfe/trunk/include/clang-c/Index.h Fri Aug 28 07:07:44 2009
@@ -41,12 +41,12 @@
 
 // Cursors represent declarations and references (provides line/column info).
 enum CXCursorKind {  
- Cursor_Declaration,
- Cursor_Reference,
- Cursor_ObjC_ClassRef,
- Cursor_ObjC_ProtocolRef,
- Cursor_ObjC_MessageRef,
- Cursor_ObjC_SelectorRef
+ CXCursor_Declaration,
+ CXCursor_Reference,
+ CXCursor_ObjC_ClassRef,
+ CXCursor_ObjC_ProtocolRef,
+ CXCursor_ObjC_MessageRef,
+ CXCursor_ObjC_SelectorRef
 };
 
 typedef void *CXDecl;    // A specific declaration within a translation unit.

Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=80359&r1=80358&r2=80359&view=diff

==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Fri Aug 28 07:07:44 2009
@@ -15,20 +15,6 @@
 
 extern "C" {
 
-// Some notes on CXEntity:
-//
-// - Since the 'ordinary' namespace includes functions, data, typedefs, ObjC interfaces, the
-// current algorithm is a bit naive (resulting in one entity for 2 different types). For example:
-//
-// module1.m: @interface Foo @end Foo *x;
-// module2.m: void Foo(int);
-//
-// - Since the unique name spans translation units, static data/functions within a CXTranslationUnit
-// are *not* currently represented by entities. As a result, there will be no entity for the following:
-//
-// module.m: static void Foo() { }
-//
-
 CXIndex clang_createIndex() 
 { 
   return 0; 
@@ -50,6 +36,23 @@
 {
 }
 
+// Some notes on CXEntity:
+//
+// - Since the 'ordinary' namespace includes functions, data, typedefs, 
+// ObjC interfaces, thecurrent algorithm is a bit naive (resulting in one 
+// entity for 2 different types). For example:
+//
+// module1.m: @interface Foo @end Foo *x;
+// module2.m: void Foo(int);
+//
+// - Since the unique name spans translation units, static data/functions 
+// within a CXTranslationUnit are *not* currently represented by entities.
+// As a result, there will be no entity for the following:
+//
+// module.m: static void Foo() { }
+//
+
+
 const char *clang_getDeclarationName(CXEntity)
 {
   return "";
@@ -94,7 +97,7 @@
 
 CXCursorKind clang_getCursorKind(CXCursor)
 {
-  return Cursor_Declaration;
+  return CXCursor_Declaration;
 }
 
 unsigned clang_getCursorLine(CXCursor)





More information about the cfe-commits mailing list