summaryrefslogtreecommitdiffstats
path: root/clang/include/clang-c/Index.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Tweak clang_visitChildren comment.Daniel Dunbar2010-01-241-3/+1
| | | | llvm-svn: 94360
* Index.h: Tweak comments, delete trailing whitespace, fix a few typos, etc.Daniel Dunbar2010-01-241-140/+144
| | | | llvm-svn: 94351
* Add doxygen comment to clang_getClangVersion().Ted Kremenek2010-01-231-1/+5
| | | | llvm-svn: 94311
* Extend clang_createTranslationUnitFromSourceFile() to support creatingDouglas Gregor2010-01-231-5/+13
| | | | | | translation units that include unsaved files. llvm-svn: 94258
* Add 'clang_getClangVersion()' function to CIndex. This exposes the full ↵Ted Kremenek2010-01-221-0/+13
| | | | | | Clang version string through the CIndex API. llvm-svn: 94242
* Improve content and structure of the Doxygen documentation for theDouglas Gregor2010-01-221-267/+401
| | | | | | CIndex API. No functionality change. llvm-svn: 94234
* Yet more CIndex API cleanup:Douglas Gregor2010-01-221-5/+60
| | | | | | | | - Added more routines to manipulate/compare source locations and ranges - Switched clang_getCursor() over to take a CXSourceLocation rather than file/line/column. llvm-svn: 94226
* Introduce type references into the C API, capturing references toDouglas Gregor2010-01-211-1/+17
| | | | | | typedefs only (for now). llvm-svn: 94078
* Stash a CXXUnit pointer into each cursor. This allows us to simplifyDouglas Gregor2010-01-201-5/+4
| | | | | | | the interface to clang_visitChildren() by eliminating the CXTranslationUnit pointer. llvm-svn: 94051
* Yet more Doxygen-comment tweaking in the CIndex library.Douglas Gregor2010-01-201-17/+52
| | | | llvm-svn: 94044
* Improve Doxygen documentation for the CIndex library, somewhat.Douglas Gregor2010-01-201-13/+57
| | | | llvm-svn: 94042
* Kill CXEntity and CXDecl. The first has never been used, while theDouglas Gregor2010-01-201-20/+0
| | | | | | second has been wholly replaced by cursors. llvm-svn: 94039
* Kill some CXDecl-related APIs that have been superceded byDouglas Gregor2010-01-201-9/+0
| | | | | | CXCursor-based APIs. llvm-svn: 94037
* Kill CXStmt. It isn't being used anywhere, and has no future.Douglas Gregor2010-01-201-1/+0
| | | | llvm-svn: 94036
* Kill clang_loadDeclaration() and clang_loadTranslationUnit().Douglas Gregor2010-01-201-53/+4
| | | | llvm-svn: 94034
* Introduce a new, cursor-based traversal function that visits theDouglas Gregor2010-01-201-0/+69
| | | | | | | | | | | | children of a given cursor, regardless of what kind of cursor it is. This is a generalization of clang_loadDeclaration and clang_loadTranslationUnit that will also extent to statements, expressions, etc. As proof-of-concept, switched clang_loadDeclaration() from its own visitor over to an instance of this traversal function internally. llvm-svn: 94022
* Attempt to improve CIndex Doxygen organization, although I can't actually ↵Douglas Gregor2010-01-201-9/+18
| | | | | | test this locally llvm-svn: 93961
* Kill off clang_getDeclColumn, clang_getDeclExtent, clang_getDeclLine,Douglas Gregor2010-01-201-11/+0
| | | | | | | clang_getDeclSource, and clang_getDeclSourceFile; the cursor equivalents are the way of the future. llvm-svn: 93955
* Introduce a special cursor kind for the translation unit, to serve asDouglas Gregor2010-01-201-2/+18
| | | | | | | | | the root of the conceptual cursor hierarchy (just like we do with declarations). This will be used when we get to unify clang_loadTranslationUnit() and clang_loadDeclaration() into something more generally useful. llvm-svn: 93954
* CXCursor_UnexposedDecl to the first declaration kindDouglas Gregor2010-01-201-12/+12
| | | | llvm-svn: 93952
* Kill CXCursor_ObjCSelectorRef, CXCursor_VarRef, CXCursor_FunctionRef,Douglas Gregor2010-01-191-6/+1
| | | | | | | and CXCursor_EnumConstantRef; they've been subsumed by expression references, which do a much nicer job. llvm-svn: 93947
* Extend the CIndex API with direct support for expressions andDouglas Gregor2010-01-191-1/+51
| | | | | | | | | | statements, moving some of the more unnatural kinds of references (VarRef, EnumConstantRef, etc.) over to the expressions. We can now poke at arbitrary expressions and statements with, e.g., clang_getCursor() and get back useful information (e.g., source ranges). llvm-svn: 93946
* Kill the unused and unnecessary CXCursor_MemberRef, twin to theDouglas Gregor2010-01-191-5/+4
| | | | | | now-dead CXCursor_ObjCIvarRef. llvm-svn: 93928
* Kill CXCursor_ObjCIvarRef. Such cursors could never be created, andDouglas Gregor2010-01-191-1/+0
| | | | | | have been marked for death for a while. llvm-svn: 93927
* Introduce the notion of an "unexposed" declaration into the CIndexDouglas Gregor2010-01-191-1/+33
| | | | | | | | API. This is a catch-all for any declaration known to Clang but not specifically part of the CIndex API. We'll use the same approach with expressions, statements, references, etc., as needed. llvm-svn: 93924
* Rework the CXSourceLocation and CXSourceRange APIs. They are nowDouglas Gregor2010-01-191-11/+46
| | | | | | | | | | opaque data structures accessed through the new functions clang_getInstantiationLocation(), clang_getRangeStart(), and clang_getRangeEnd(). The new API permits later extensions to introduce new functions to allow CIndex clients to walk macro instantiations, if we ever care. llvm-svn: 93915
* Eliminate cursor kinds used to express definitions. Instead, provideDouglas Gregor2010-01-191-13/+42
| | | | | | | | | | | | CIndex functions that (1) map from a reference or declaration to the corresponding definition, if available, and (2) determine whether a given declaration cursor is also a definition. This eliminates a lot of duplication in the cursor kinds, and maps more closely to the Clang ASTs. This is another API + ABI breaker with no deprecation. Yay, progress. llvm-svn: 93893
* Introduce clang_getCursorReferenced, to get a cursor pointing at theDouglas Gregor2010-01-191-3/+15
| | | | | | entity that a particular cursor references. llvm-svn: 93830
* Implement clang_getCursorExtent, which provides a source range for theDouglas Gregor2010-01-191-0/+11
| | | | | | | | | | | | | cursor itself. In particular, for references this returns the source range of the reference rather than the source range of the thing it refers to. Switch c-index-test from clang_getDeclExtent (which will eventually be deprecated and removed) over to clang_getCursorExtent. The source ranges we print for references now make sense; fix up the tests appropriately. llvm-svn: 93823
* Now that a reasonable deprecation cycle has passed, killDouglas Gregor2010-01-181-5/+0
| | | | | | | clang_getCursorLine(), clang_getCursorColumn(), clang_getCursorSource(), and clang_getCursorSourceFile() outright. llvm-svn: 93801
* Introduce clang_getCursorLocation(), which supercedesDouglas Gregor2010-01-181-3/+17
| | | | | | | | clang_getCursorLine(), clang_getCursorColumn(), clang_getCursorSource(), and clang_getCursorSourceFile(). Mark those 4 functions as deprecated and stop using them ourselves. llvm-svn: 93800
* Clean up the CIndex API slightly.Douglas Gregor2010-01-181-7/+19
| | | | | | | | | | | Renamed CXSourceFileLine to CXSourceLocation and added a CXFile, to better match Clang's SourceLocation. Teach clang_getDeclExtent to fill in the CXFile properly. Renamed CXSourceExtent to CXSourceRange, to better match Clang's SourceLocation. llvm-svn: 93783
* Replace clang_getDeclUSR() with clang_getCursorUSR(). Also remove printing ↵Ted Kremenek2010-01-181-1/+4
| | | | | | 'contexts' from c-index-test output; it wasn't helpful and was extremely brittle. llvm-svn: 93760
* Remove 'default' case in switch statement in clang_getCursorKindSpelling(). ↵Ted Kremenek2010-01-161-18/+18
| | | | | | This identified a missing case (warned by the compiler) and identified that CXCursor_FirstDecl didn't actually correspond to the first decl. llvm-svn: 93622
* Make CXCursor's data opaque.Douglas Gregor2010-01-151-3/+1
| | | | llvm-svn: 93561
* Add 'referringDecl' field to CXCursor to prepare the way to better model ↵Ted Kremenek2010-01-131-0/+1
| | | | | | declaration references from other delcarations. llvm-svn: 93343
* Rename clang_getUSR() -> clang_getDeclUSR(). For now we take a CXDecl ↵Ted Kremenek2010-01-121-1/+1
| | | | | | | | instead of a CXEntity. Enhance USR generation a bit with support for records. llvm-svn: 93267
* Change clang_getUSR() to return a CXString instead of a 'const char *'.Ted Kremenek2010-01-121-1/+1
| | | | llvm-svn: 93213
* CIndex:Ted Kremenek2010-01-111-4/+10
| | | | | | | | | - Remove unused (and unimplemented) clang_getDeclarationName(). - Remove unused (and unimplemented) clang_getEntity(). - Add clang_getEntityFromDecl(): maps from a CXDecl to a CXEntity) - Add clang_getDeclaration(): maps from a (CXEntity, CXTranslationUnit) to a CXDecl). llvm-svn: 93209
* Improve code completion by introducing patterns for the various C andDouglas Gregor2010-01-101-1/+22
| | | | | | | | | | | | | | | | | | | | | | C++ grammatical constructs that show up in top-level (namespace-level) declarations, member declarations, template declarations, statements, expressions, conditions, etc. For example, we now provide a pattern for static_cast<type>(expr) when we can have an expression, or using namespace identifier; when we can have a using directive. Also, improves the results of code completion at the beginning of a top-level declaration. Previously, we would see value names (function names, global variables, etc.); now we see types, namespace names, etc., but no values. llvm-svn: 93134
* For now, add back clang_getDeclSource().Ted Kremenek2010-01-081-0/+1
| | | | llvm-svn: 93003
* Change clang_getDeclExtent() to have the endpoint point to the last ↵Ted Kremenek2010-01-061-2/+2
| | | | | | character in the last token. llvm-svn: 92869
* Add missing CINDEX_LINKAGE.Daniel Dunbar2010-01-061-4/+5
| | | | llvm-svn: 92827
* Remove deprecated function 'clang_getDeclSource()'. Use ↵Ted Kremenek2010-01-051-1/+0
| | | | | | 'clang_getDeclFile()' instead. llvm-svn: 92803
* Add C API hook 'clang_getDeclExtent()', which returns the source extent of a ↵Ted Kremenek2010-01-051-0/+16
| | | | | | declaration. This implements <rdar://problem/7280072>. llvm-svn: 92802
* Split (mostly nonexistent) USR code out from the main CIndex logic.Ted Kremenek2010-01-051-2/+2
| | | | llvm-svn: 92789
* Extend code-completion results with the type of each resultDouglas Gregor2009-12-181-1/+9
| | | | llvm-svn: 91702
* Change clang_codeComplete API to return the results in a structure onDouglas Gregor2009-12-181-34/+42
| | | | | | | | the heap, so that clients are not forced to copy the results during the initial iteration. A separate clang_disposeCodeCompleteResults function frees the returned results. llvm-svn: 91690
* Include <time.h> in order to use 'time_t'.Chandler Carruth2009-12-171-0/+1
| | | | llvm-svn: 91597
* Switch clang_createTranslationUnitFromSourceFile to use ↵Daniel Dunbar2009-12-031-17/+39
| | | | | | | | | | | | | | | | | | | ASTUnit::LoadFromCommandLine. - This is much faster, as it avoids the overhead of dumping an AST file to disk and reloading it. - For debugging purposes, there is a clang_setUseExternalASTGeneration hook which can be used to disable this. On the Sketch Cocoa app, the speedup is pretty nice, especially when using a PCH file while scanning the source: Wall time to c-index-test all files (no PCH): Old: 23.4221 New: 12.3884 Wall time to c-index-test all files (with a PCH, and "local" mode): Old: 10.9233 New: 1.9038 llvm-svn: 90385
OpenPOWER on IntegriCloud