[cfe-commits] r80279 - in /cfe/trunk: clang.xcodeproj/project.pbxproj include/clang-c/Index.h tools/CIndex/CIndex.cpp

Daniel Dunbar daniel at zuster.org
Mon Aug 31 23:04:08 PDT 2009


Hi Steve,

On Thu, Aug 27, 2009 at 12:51 PM, Steve Naroff<snaroff at apple.com> wrote:
> +/*
> +   Clang indeX abstractions. The backing store for the following API's will be
> +   clangs PCH file (which contains AST's, or Abstract Syntax Trees). PCH files
> +   are created by the following command:
> +
> +   "clang -emit-pch <sourcefile.langsuffix> -o <sourcefile.ast>".
> +
> +   If the ast file format ends up diverging from the pch file format, we will
> +   need to add a new switch (-emit-ast). For now, the contents are identical.
> +
> +   Naming Conventions: To avoid namespace pollution, data types are prefixed
> +   with "CX" and functions are prefixed with "clang_".
> +*/
> +typedef void *CXIndex;            // An indexing instance.
> +
> +typedef void *CXTranslationUnit;  // A translation unit instance.
> +
> +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
> +};

It would be nice if all of these comments were doxygenified. Since
this is designed to be a public API, its worth spending some effort to
make the doxygen for this file come out nice:
  http://clang.llvm.org/doxygen/Index_8h.html

 - Daniel




More information about the cfe-commits mailing list