]> granicus.if.org Git - clang/commitdiff
Add CX prefix to Cursor and move a comment.
authorSteve Naroff <snaroff@apple.com>
Fri, 28 Aug 2009 12:07:44 +0000 (12:07 +0000)
committerSteve Naroff <snaroff@apple.com>
Fri, 28 Aug 2009 12:07:44 +0000 (12:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80359 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang-c/Index.h
tools/CIndex/CIndex.cpp

index 426223fb1afdb53f69188afdb295937c5808fadf..52ffb931ee1fa150546119dbe4c3a8b5a08f856d 100644 (file)
@@ -41,12 +41,12 @@ typedef void *CXCursor;  // An opaque cursor into the CXTranslationUnit.
 
 // 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.
index 86e63607b473cc99af675f967bc873d321622d6f..ec575475ecd503880f2a09e22233a186b0c7e378 100644 (file)
 
 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 @@ void clang_loadDeclaration(CXDecl, void (*callback)(CXDecl, CXCursor))
 {
 }
 
+// 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 @@ CXCursor clang_getCursor(CXTranslationUnit, const char *source_name,
 
 CXCursorKind clang_getCursorKind(CXCursor)
 {
-  return Cursor_Declaration;
+  return CXCursor_Declaration;
 }
 
 unsigned clang_getCursorLine(CXCursor)