summaryrefslogtreecommitdiffstats
path: root/clang/include/clang-c/Index.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Extend the CIndex code-completion API to perform code completionDouglas Gregor2009-12-021-0/+37
| | | | | | | involving unsaved files, using the -remap-file= functionality recently added to clang-cc. llvm-svn: 90314
* Add clang_getNullCursor() and clang_equalCursors() (the latter for comparing ↵Ted Kremenek2009-11-171-0/+4
| | | | | | cursors). llvm-svn: 89131
* Allow "source_filename" to be an optional argument (the client can provide ↵Ted Kremenek2009-11-171-1/+2
| | | | | | NULL). This allows the client to put the source_filename in the command_line_args without fear of the file being named twice. llvm-svn: 89118
* Introduce CXString type and associated functions clang_getCString() and ↵Steve Naroff2009-11-091-4/+23
| | | | | | | | | | clang_disposeString(). This abstraction will help us manage string memory for complex names that cross the C++/C boundary (e.g. ObjC methods, selectors). This patch also uses it in clang_getTranslationUnitSpelling (which I'm not sure is necessary). Will investigate later...since the extra malloc() can't hurt (for now). Patch by John Thompson. llvm-svn: 86562
* Various improvements to Clang's code-completion infrastructure:Douglas Gregor2009-11-071-0/+321
| | | | | | | | | | | | | | - Introduce more code-completion string "chunk" kinds that describe symbols, the actual text that the user is expected to type, etc. - Make the generation of macro results optional, since it can be slow - Make code-completion accessible through the C API, marshalling the code-completion results through a temporary file (ick) to maintain process separation. The last doesn't have tests yet. llvm-svn: 86306
* Add two missing CINDEX_LINKAGE uses, in libCIndex, from KovarththananDouglas Gregor2009-10-311-2/+2
| | | | | | Rajaratnam! llvm-svn: 85665
* Remove _clang_initCXLookupHint() and _clang_getCursorWithHint(). Related to ↵Steve Naroff2009-10-281-15/+0
| | | | | | | | | | <rdar://problem/7310688>. Localize the optimization to ResolveLocationInAST(). The last valid AST location is now stored with ASTUnit. There still isn't optimal, however it's an improvement (with a much cleaner API). Having the client manage an "hint" is error prone and complex. I wanted to land the major changes before finishing up the optimizations. llvm-svn: 85425
* Add support for 'CXFile' (<rdar://problem/7303360>).Steve Naroff2009-10-271-3/+14
| | | | | | | | | | - 4 new functions (clang_getCursorSourceFile, clang_getDeclSourceFile, clang_getFileName, clang_getFileTime). - Should remove clang_getDeclSource() and clang_getCursorSource(). For now, just put 'deprecate' comment in header. - Also changed CXX style comment to C style (to eliminate warning). llvm-svn: 85238
* Changes for building as a Windows DLLJohn Thompson2009-10-271-32/+43
| | | | llvm-svn: 85234
* Split clang_getCursor() into clang_getCursor() and clang_getCursorWithHint().Ted Kremenek2009-10-221-5/+16
| | | | llvm-svn: 84873
* Enhance 'clang_createTranslationUnitFromSourceFile()' in two ways:Ted Kremenek2009-10-221-3/+11
| | | | | | | | | (1) Allow the source file to be specified in the actual command line arguments by allowing the caller to set 'source_filename' to NULL. (2) Automatically strip off the arguments '-emit-ast', '-fsyntax-only', and '-c'. llvm-svn: 84802
* Extend clang_getCursor() to take a 'relativeDecl' argument (so speed up ↵Steve Naroff2009-10-211-1/+9
| | | | | | | | | | | | | | searching). Without a 'relativeDecl', the algorithm is n-squared. For example, running the following command on 'Large.m' takes hours without a 'relatvieDecl'. snaroff% time ../../Debug/bin/c-index-test Large.ast all > Large.out snaroff% cat Large.m #import <Cocoa/Cocoa.h> #import <QuickTime/QuickTime.h> #import <OpenGL/OpenGL.h> With a 'relativeDecl', it takes <30 seconds:-) llvm-svn: 84760
* Add an example to help claify the process/assumptions...Steve Naroff2009-10-201-0/+24
| | | | llvm-svn: 84642
* - Extend clang_createIndex() to support PCH and diagnostic 'filtering'. This ↵Steve Naroff2009-10-201-20/+26
| | | | | | | | | | | | seems cleaner to me without sacrificing much flexibility. - Remove clang_wantOnlyLocalDeclarations(). - Remove 'displayDiagnostics' arguments to clang_createTranslationUnitFromSourceFile() and clang_createTranslationUnit(). - Have clang_createTranslationUnitFromSourceFile() strip the '-o <outfile>' command line arguments if they exist. Document this semantic in the header. Also verify we have a valid ASTUnit before telling it to 'unlinkTemporaryFile()'. llvm-svn: 84634
* Really fix <rdar://problem/7312058> by adding a 'displayDiagnostics' option toTed Kremenek2009-10-191-3/+14
| | | | | | | | | | | clang_createTranslationUnit() and clang_createTranslationUnitFromSourceFile(). The user can now specify if the diagnostics from Clang are printed to stderr or are silenced completely. We can obviously evolve this API to be more general in the future. Note: Added a FIXME since I wasn't certain what was the best way to redirect to something analogous to '/dev/null' on Windows. llvm-svn: 84548
* Keep track of whether declararions were loaded from a precompiledDouglas Gregor2009-10-161-0/+11
| | | | | | | | | | header or not via a new "PCHLevel" field in Decl. We currently use this information to help CIndex filter out declarations that came from a precompiled header (rather than from an AST file). Further down the road, it can be used to help implement multi-level precompiled headers. llvm-svn: 84267
* Implement <rdar://problem/7303432> [Clang/Index] In-memory-style AST ↵Steve Naroff2009-10-151-0/+6
| | | | | | | | | generation API (initial API implementation). Added clang_createTranslationUnitFromSourceFile(). Changed clang_createIndex() to lookup the location of clang (using dladdr). llvm-svn: 84198
* Add clang_getDeclSource().Steve Naroff2009-09-251-0/+1
| | | | llvm-svn: 82807
* Add clang_getDeclLine and clang_getDeclColumnSteve Naroff2009-09-251-0/+3
| | | | | | | Fix clang_getCursorDecl to do the right thing for expr refs Fixup test file to accommodate new output (which includes the line/column for the referenced decl) llvm-svn: 82798
* More work to enable more exhaustive testing of the indexing API.Steve Naroff2009-09-231-1/+9
| | | | | | Next step: Add actual some test cases:-) llvm-svn: 82636
* - Implement support for various types of "refs" (initially to help test ↵Steve Naroff2009-09-221-7/+15
| | | | | | | | clang_getCursor()). - Add missing prototypes for dispose functions. llvm-svn: 82564
* fit in 80 colsChris Lattner2009-09-161-1/+2
| | | | llvm-svn: 82073
* - clang_getCursor(): Replace asserts with error codes (CXCursor_InvalidFile, ↵Steve Naroff2009-09-151-3/+9
| | | | | | | | | CXCursor_NoDeclFound). - Add predicate clang_isInvalid(). - Implement clang_getCursorFromDecl(). llvm-svn: 81908
* - Add back some harmless code that part of a reverted commit (r80859). I'll ↵Steve Naroff2009-09-031-1/+4
| | | | | | | | investigate the lifetime snafu (with ASTUnit) separately. - Traverse category methods, add a "class ref" and make the little test harness a bit more flexible. llvm-svn: 80921
* Revert "Visit function/method bodies and issue callback for parameters and localDaniel Dunbar2009-09-031-2/+0
| | | | | | variables.", this is breaking x86_64-apple-darwin10 and Linux tests. llvm-svn: 80896
* Visit function/method bodies and issue callback for parameters and local ↵Steve Naroff2009-09-031-0/+2
| | | | | | | | variables. Add clang_getTranslationUnitSpelling(). llvm-svn: 80859
* Start issuing callback for references (add some predicates, refactor some code).Steve Naroff2009-09-021-6/+10
| | | | llvm-svn: 80810
* Flesh out CXCursorKind...Steve Naroff2009-09-021-24/+36
| | | | | | | | | - More declaration types (distinguish between struct/union/class, instance/class methods). - Add definition types (class, category, function, instance/class method, etc.). Add client data to clang_loadDeclaration() and implement. llvm-svn: 80787
* Tweak comment based on Daniel's recently added '-emit-ast' option.Steve Naroff2009-09-011-6/+2
| | | | llvm-svn: 80684
* Add explicit "blind" client data to callback function (since we aren't using ↵Steve Naroff2009-09-011-2/+5
| | | | | | blocks). llvm-svn: 80673
* Implement source/line/column hooks.Steve Naroff2009-08-311-1/+1
| | | | llvm-svn: 80585
* More fleshing out the C-based indexing API (under construction).Steve Naroff2009-08-311-36/+43
| | | | llvm-svn: 80529
* Lot's of little changes to get the C-based indexing API going...Steve Naroff2009-08-281-20/+22
| | | | | | Work in progress. llvm-svn: 80367
* Add CX prefix to Cursor and move a comment.Steve Naroff2009-08-281-6/+6
| | | | llvm-svn: 80359
* Fill in Index.h header file and add stubs to implementation file.Steve Naroff2009-08-271-5/+138
| | | | llvm-svn: 80279
* Add initial boilerplate for CIndex, a shared library that will vend high-levelTed Kremenek2009-08-261-0/+33
source symbol information (harvested by Clang) through a C API. llvm-svn: 80166
OpenPOWER on IntegriCloud