summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce a new libclang API, clang_reparseTranslationUnit(), whichDouglas Gregor2010-07-191-1/+63
| | | | | | | | reparses an already-parsed translation unit. At the moment it's just a convenience function, but we hope to use it for performance optimizations. llvm-svn: 108756
* Add a -code-completion-timing= mode to c-index-test, so that we canDouglas Gregor2010-07-121-7/+15
| | | | | | | test the performance of code-completion without testing the performance of printf(). llvm-svn: 108172
* Silence warning about C++-style comments.Benjamin Kramer2010-06-221-2/+2
| | | | llvm-svn: 106531
* Add CXType support for querying the return type of Objective-C methods. ↵Ted Kremenek2010-06-211-1/+1
| | | | | | | | This is done by adding a clang_getCursorResultType() function (which complements clang_getResultType()). llvm-svn: 106473
* Add CXType support for FunctionNoProto and FunctionProto types. This ↵Ted Kremenek2010-06-211-6/+19
| | | | | | | | includes adding a new function, clang_getResultType(), which returns the result type of the function type. llvm-svn: 106459
* Makefiles: Remove unnecessary early include of Makefile.config.Daniel Dunbar2010-06-081-2/+0
| | | | llvm-svn: 105640
* Makefiles: Set Clang CPP compiler flags in a single location, instead of ↵Daniel Dunbar2010-06-081-1/+0
| | | | | | scattered throughout the project Makefiles. llvm-svn: 105638
* Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.Daniel Dunbar2010-06-081-3/+3
| | | | | | - This eliminates most dependencies on how Clang is installed relative to LLVM. llvm-svn: 105637
* Introduce priorities into the code-completion results.Douglas Gregor2010-05-261-1/+2
| | | | llvm-svn: 104751
* Add CXType and an initial set of supporting functions to libclang. This ↵Ted Kremenek2010-05-141-0/+29
| | | | | | | | | exposes details of Clang's representation of the C type system to clients. It is nowhere near complete, and will be expanded on demand. llvm-svn: 103809
* Rename 'CIndex' to 'libclang', since it has basically become our stable publicDaniel Dunbar2010-04-302-2/+2
| | | | | | (C) API, and will likely grow further in this direction in the future. llvm-svn: 102779
* Move include installation steps to better location, inside each include dir ↵Daniel Dunbar2010-04-301-1/+0
| | | | | | | | instead of at the top-level. Also, don't set NO_INSTALL=1 for c-index-test. llvm-svn: 102724
* Fix USRs for 'extern' variables declaration in functions/method bodies.Ted Kremenek2010-04-201-3/+4
| | | | | | | Fix USRs for @synthesize. Add more USR tests. llvm-svn: 101954
* Rework USR generation for symbols with no linkage. Many of the USRs are now ↵Ted Kremenek2010-04-161-1/+1
| | | | | | | | | | shortened, and we now include the file name that declares the symbol with no linkage in the USR. USRs for such symbols are generated only in restructed cases, e.g., anonymous enum declarations, typedefs, etc. llvm-svn: 101542
* Add c-index-test support for printing USRs.Ted Kremenek2010-03-251-4/+187
| | | | llvm-svn: 99476
* c-index-test's printing of linkage was completely broken, as was theDouglas Gregor2010-03-041-4/+4
| | | | | | test of this functionality. The API worked great, though! :) llvm-svn: 97736
* Add '-test-print-linkage-source' option to c-index-testTed Kremenek2010-03-031-1/+32
| | | | | | to test clang_getCursorLinkage() llvm-svn: 97648
* Rework the CIndex API for displaying diagnostics. Instead of printingDouglas Gregor2010-02-221-2/+6
| | | | | | | the diagnostics to a FILE*, return a CXString containing the formatted diagnostic. llvm-svn: 96823
* Simplify the CIndex fix-it API, now that we have half-open CXSourceRanges.Douglas Gregor2010-02-191-41/+19
| | | | llvm-svn: 96685
* Re-apply my diagnostics-capture patch for CIndex, with some tweaks toDouglas Gregor2010-02-181-109/+66
| | | | | | try to address the msvc failures. llvm-svn: 96624
* Revert my CIndex diagnostic changes (r96603, 96606, 96607), which wereDouglas Gregor2010-02-181-66/+109
| | | | | | breaking the msvc9 builder for unknown reasons. llvm-svn: 96618
* Introduce debugging/testing hook clang_enableStackTraces() intoDouglas Gregor2010-02-181-0/+1
| | | | | | | CIndex, so that c-index-test to use it to call lvm::sys::PrintStackTraceOnErrorSignal(). llvm-svn: 96607
* Resurrect the displayDiagnostics parameter to clang_createIndex(), andDouglas Gregor2010-02-181-6/+9
| | | | | | | display captured diagnostics when we can't return an invalid CXTranslationUnit. llvm-svn: 96606
* Introduce CIndex API functions for displaying a diagnostic, with someDouglas Gregor2010-02-181-103/+56
| | | | | | | | | | | knobs to control formatting. Eventually, I'd like to merge the implementation of this code with the TextDiagnosticPrinter, so that it's easy for CIndex clients to produce beautiful diagnostics like the clang compiler does. Use this new function to display diagnostics within c-index-test. llvm-svn: 96603
* Rework how CIndex handles diagnostics. Rather than using a callback,Douglas Gregor2010-02-181-19/+25
| | | | | | | | | | | | | | | | | | we attach diagnostics to translation units and code-completion results, so they can be queried at any time. To facilitate this, the new StoredDiagnostic class stores a diagnostic in a serializable/deserializable form, and ASTUnit knows how to capture diagnostics in this stored form. CIndex's CXDiagnostic is a thin wrapper around StoredDiagnostic, providing a C interface to stored or de-serialized diagnostics. I've XFAIL'd one test case temporarily, because currently we end up storing diagnostics in an ASTUnit that's never returned to the user (because it contains errors). I'll introduce a temporary fix for this soon; the real fix will be to allow us to return and query invalid ASTs. llvm-svn: 96592
* Convert clang_getCompletionChunkText() to return a CXString.Ted Kremenek2010-02-171-2/+6
| | | | llvm-svn: 96439
* Change clang_getCursorKindSpelling() to return a CXStringTed Kremenek2010-02-171-112/+122
| | | | | | instead of a 'const char *'. llvm-svn: 96425
* Change clang_getFileName() to return a 'CXString' instead of 'const char *'.Ted Kremenek2010-02-171-9/+27
| | | | llvm-svn: 96424
* c-index-test: Pass appropriate client data.Daniel Dunbar2010-02-161-1/+1
| | | | llvm-svn: 96317
* CIndex: Switch CXSourceRange to proper half-open intervals.Daniel Dunbar2010-02-141-3/+2
| | | | | | - Doug, please review. llvm-svn: 96162
* c-index-test: Unify and always print half-open extents.Daniel Dunbar2010-02-141-8/+7
| | | | llvm-svn: 96160
* c-index-test: Simplify file scanning code.Daniel Dunbar2010-02-141-46/+28
| | | | llvm-svn: 96159
* c-index-test: Unify syntax for printing extents. Yes, there were 4.Daniel Dunbar2010-02-141-16/+25
| | | | llvm-svn: 96158
* Attempt to always dispose of the CXIndex object in c-index-test.Ted Kremenek2010-02-111-3/+12
| | | | llvm-svn: 95864
* c-index-test: Add "none" filter, useful for performance testing.Daniel Dunbar2010-02-101-0/+1
| | | | llvm-svn: 95800
* Clean up the CIndex interface to diagnostic ranges. Thanks, Daniel!Douglas Gregor2010-02-081-8/+7
| | | | llvm-svn: 95602
* When printing diagnostics in c-index-test, also print source rangesDouglas Gregor2010-01-291-2/+85
| | | | | | | | and fix-it information, so we can see everything in one place. Along the way, fix a few bugs with deserialization and query of diagnostics in CIndex. llvm-svn: 94768
* Switch the remaining diagnostic printing in CIndex over to theDouglas Gregor2010-01-281-10/+9
| | | | | | | | | diagnostic callback mechanism, so all diagnostics now go through that callback. Also, eliminate the displayDiagnostics flag to clang_createIndex(), since it is no longer necessary: the client determines whether to display diagnostics or not. llvm-svn: 94714
* Implement a diagnostics callback for the C interface to Clang, so thatDouglas Gregor2010-01-281-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | | clients can format diagnostics as they wish rather than having to parse standard error. All of the important parts of the front end's diagnostics are exposed: text, severity, location, source ranges, and fix-its. The diagnostics callback is now available with clang_createTranslationUnitFromSource() and clang_createTranslationUnit(). As part of this change, CXSourceLocation and CXSourceRange got one pointer larger, since we need to hold on to the SourceManager and LangOptions structures in the source location. This is the minimum amount of information needed for the functions that operate on source locations and ranges (as implemented now). Previously we held on to the ASTContext, but the diagnostics callback can end up with source locations when there is no ASTContext (or preprocessor). Still to do: - Code completion needs to support the diagnostics callback, once we have the ability to (de-)serialize diagnostics. - Eliminate the "displayDiagnostics" argument to createIndex; we'll always pass diagnostics to the callback and let it deal with display. llvm-svn: 94709
* Implement 'clang_getInclusions()' in CIndex. This API allows clients to ↵Ted Kremenek2010-01-261-1/+33
| | | | | | walk the set of files included in a translation unit via the C API. llvm-svn: 94575
* Eliminate clang_getInstantiationLocationOffset(), and instead add anDouglas Gregor2010-01-261-8/+8
| | | | | | offset parameter to clang_getInstantiationLocation(). llvm-svn: 94573
* Implement clang_annotateTokens(), which associates cursors with eachDouglas Gregor2010-01-261-1/+6
| | | | | | | of the tokens within a raw token stream. This does not even attempt to handle macros yet. llvm-svn: 94561
* Add 'PostVisitTU' callback hook to 'perform_test_load()' to allow a special ↵Ted Kremenek2010-01-261-9/+21
| | | | | | callback after the translation unit has been loaded (and streamed). llvm-svn: 94557
* Allow the 'visitor' argument to 'perform_test_load()' to be NULL. TheTed Kremenek2010-01-261-18/+22
| | | | | | | utility of this change will be made clearer in a subsequent patch when perform_test_load()' does more than stream the AST. llvm-svn: 94556
* Introduce a CIndex API for lexing the raw tokens within a given sourceDouglas Gregor2010-01-261-30/+151
| | | | | | range. The token-annotation function does nothing, yet. llvm-svn: 94551
* -fno-rtti is now the default.Chris Lattner2010-01-241-1/+0
| | | | llvm-svn: 94379
* Extend clang_createTranslationUnitFromSourceFile() to support creatingDouglas Gregor2010-01-231-102/+112
| | | | | | translation units that include unsaved files. llvm-svn: 94258
* Yet more CIndex API cleanup:Douglas Gregor2010-01-221-4/+13
| | | | | | | | - 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
* Stash a CXXUnit pointer into each cursor. This allows us to simplifyDouglas Gregor2010-01-201-1/+1
| | | | | | | the interface to clang_visitChildren() by eliminating the CXTranslationUnit pointer. llvm-svn: 94051
* Switch c-index-test from clang_loadDeclaration() andDouglas Gregor2010-01-201-55/+44
| | | | | | clang_loadTranslationUnit() over to clang_visitChildren(). llvm-svn: 94031
OpenPOWER on IntegriCloud