summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test/c-index-test.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Extend the CIndex code-completion API to perform code completionDouglas Gregor2009-12-021-1/+95
| | | | | | | involving unsaved files, using the -remap-file= functionality recently added to clang-cc. llvm-svn: 90314
* c-index-test: Split "function scanning" behavior into its own "filter" -- itsDaniel Dunbar2009-12-011-68/+63
| | | | | | | | quite slow and doesn't really stress the APIs people should really use. - I'm not even sure if this mode is still useful given the other scanning mode; Steve? llvm-svn: 90193
* Add c-index-test -test-load-source, which loads the translation unit from a ↵Daniel Dunbar2009-12-011-1/+36
| | | | | | source file (and other command line arguments). llvm-svn: 90187
* Add special clang_getCursor() support for @class. Handles ↵Ted Kremenek2009-11-181-9/+16
| | | | | | <rdar://problem/7383421>. llvm-svn: 89183
* fgetln is a BSDism; replace it with more portable code.Benjamin Kramer2009-11-171-6/+9
| | | | llvm-svn: 89140
* Add c-index-test mode "-test-file-scan", which scans a source file and calls ↵Ted Kremenek2009-11-171-6/+100
| | | | | | clang_getCursor() on every character. llvm-svn: 89136
* Organize c-index-test into logic sections, and add section headers.Ted Kremenek2009-11-171-42/+62
| | | | llvm-svn: 89117
* Clean up c-index-test command line usage a bit by requiring a ↵Ted Kremenek2009-11-171-36/+49
| | | | | | "-test-load-tu" option when testing clang_loadTranslationUnit(). Running c-index-test without the correct arguments now also prints a useful summary of its correct usage. llvm-svn: 89115
* Have clang_getCursorSource() return NULL when the source location is invalid ↵Ted Kremenek2009-11-171-4/+11
| | | | | | or refers to a built-in buffer. Implements <rdar://problem/7296243>. llvm-svn: 89044
* Improve c-index-test's parsing of the -code-completion-at=file:line:column ↵Douglas Gregor2009-11-091-21/+24
| | | | | | argument llvm-svn: 86566
* Introduce CXString type and associated functions clang_getCString() and ↵Steve Naroff2009-11-091-4/+17
| | | | | | | | | | 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
* C doesn't allow mixing declarations and statements, sillyDouglas Gregor2009-11-091-2/+2
| | | | llvm-svn: 86556
* Minor cleanup for CIndex-based code-completion:Douglas Gregor2009-11-091-11/+24
| | | | | | | | - Provide an actual test for code-completion via CIndex. - Actually print optional strings in c-index-test - Export clang_getCompletionChunkCompletionString from CIndex llvm-svn: 86550
* Revert unintentional change to this file.Daniel Dunbar2009-11-081-2/+1
| | | | llvm-svn: 86455
* CIndex: Add temporary hack to leak memory instead of returning invalid pointers.Daniel Dunbar2009-11-081-1/+2
| | | | llvm-svn: 86438
* Fix some build warnings.Daniel Dunbar2009-11-071-2/+5
| | | | llvm-svn: 86393
* Various improvements to Clang's code-completion infrastructure:Douglas Gregor2009-11-071-0/+106
| | | | | | | | | | | | | | - 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
* Remove _clang_initCXLookupHint() and _clang_getCursorWithHint(). Related to ↵Steve Naroff2009-10-281-6/+2
| | | | | | | | | | <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
* Changes for building as a Windows DLLJohn Thompson2009-10-271-0/+16
| | | | llvm-svn: 85234
* Fixes a warning.Fariborz Jahanian2009-10-221-1/+1
| | | | llvm-svn: 84909
* Split clang_getCursor() into clang_getCursor() and clang_getCursorWithHint().Ted Kremenek2009-10-221-2/+6
| | | | llvm-svn: 84873
* Extend clang_getCursor() to take a 'relativeDecl' argument (so speed up ↵Steve Naroff2009-10-211-2/+2
| | | | | | | | | | | | | | 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
* - Extend clang_createIndex() to support PCH and diagnostic 'filtering'. This ↵Steve Naroff2009-10-201-5/+3
| | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | 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
* Fix compiler warning: "ISO C90 forbids mixed declarations and code"Ted Kremenek2009-10-171-3/+9
| | | | llvm-svn: 84318
* Fix warning: 'warning: C++ style comments are not allowed in ISO C90'Ted Kremenek2009-10-171-1/+1
| | | | llvm-svn: 84317
* Make CIndex and c-index-test a little bit more robust. The onlyDouglas Gregor2009-10-161-1/+3
| | | | | | | | substantive change is that clang_getCursorSource() now returns the file in which a macro was instantiated when the cursor points into a macro instantiation, rather than crashing. llvm-svn: 84275
* Keep track of whether declararions were loaded from a precompiledDouglas Gregor2009-10-161-1/+7
| | | | | | | | | | 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
* Make sure temporary files get unlinked.Steve Naroff2009-10-151-0/+2
| | | | llvm-svn: 84208
* Fix C90 compile warning about mixed declarations and code.Eric Christopher2009-10-051-9/+10
| | | | llvm-svn: 83327
* Add support for class and protocol references.Steve Naroff2009-10-011-6/+4
| | | | llvm-svn: 83186
* Add clang_getDeclLine and clang_getDeclColumnSteve Naroff2009-09-251-1/+8
| | | | | | | 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
* Add test for C-based indexing API, using FileCheck utility.Steve Naroff2009-09-241-14/+17
| | | | llvm-svn: 82706
* Some minor cleanups...Steve Naroff2009-09-231-41/+41
| | | | llvm-svn: 82646
* More work to enable more exhaustive testing of the indexing API.Steve Naroff2009-09-231-0/+26
| | | | | | Next step: Add actual some test cases:-) llvm-svn: 82636
* - clang_getCursor(): Replace asserts with error codes (CXCursor_InvalidFile, ↵Steve Naroff2009-09-151-3/+8
| | | | | | | | | CXCursor_NoDeclFound). - Add predicate clang_isInvalid(). - Implement clang_getCursorFromDecl(). llvm-svn: 81908
* Make sure ObjCInterfaceDecl's that are forward declared always contain a ↵Steve Naroff2009-09-111-5/+5
| | | | | | valid location. llvm-svn: 81487
* Implement accessors clang_getCursorKind(), clang_getCursorDecl().Steve Naroff2009-09-041-4/+13
| | | | | | | Implement clang_getCursor() - wired up to Argiris's work. Implement callbacks for CXCursor_ObjCProtocolRef. llvm-svn: 81004
* - Add back some harmless code that part of a reverted commit (r80859). I'll ↵Steve Naroff2009-09-031-11/+29
| | | | | | | | 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-14/+12
| | | | | | 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-12/+14
| | | | | | | | variables. Add clang_getTranslationUnitSpelling(). llvm-svn: 80859
* Fix warnings.Eli Friedman2009-09-021-2/+0
| | | | llvm-svn: 80833
* Start issuing callback for references (add some predicates, refactor some code).Steve Naroff2009-09-021-4/+4
| | | | llvm-svn: 80810
* Flesh out CXCursorKind...Steve Naroff2009-09-021-13/+24
| | | | | | | | | - 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
* Add explicit "blind" client data to callback function (since we aren't using ↵Steve Naroff2009-09-011-7/+14
| | | | | | blocks). llvm-svn: 80673
* Implement source/line/column hooks.Steve Naroff2009-08-311-3/+7
| | | | llvm-svn: 80585
* More fleshing out the C-based indexing API (under construction).Steve Naroff2009-08-311-1/+8
| | | | llvm-svn: 80529
* Lot's of little changes to get the C-based indexing API going...Steve Naroff2009-08-281-0/+12
Work in progress. llvm-svn: 80367
OpenPOWER on IntegriCloud