summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test
Commit message (Collapse)AuthorAgeFilesLines
* Introduce a new libclang function,Douglas Gregor2010-09-021-1/+12
| | | | | | | | | clang_getSpecializedCursorTemplate(), which determines the template (or member thereof) that the given cursor specializes or from which it was instantiated. This routine can be used to establish a link between templates and their instantiations/specializations. llvm-svn: 112780
* Implement CXCursor support for walking C++ base specifiers. This includes ↵Ted Kremenek2010-08-271-0/+20
| | | | | | | | adding the API hooks clang_isVirtualBase() and clang_getCXXAccessSpecifier() to query properties of the base specifier. Implements <rdar://problem/8274883>. llvm-svn: 112296
* Move the sorting of code-completion results out of the main path andDouglas Gregor2010-08-261-1/+25
| | | | | | | | | | | into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. Provide a libclang function that sorts the results. 3rd try. How embarrassing. llvm-svn: 112180
* Revert r112149, "Move the sorting of code-completion results out of the mainDaniel Dunbar2010-08-261-25/+1
| | | | | | path and ...", it is failing tests. llvm-svn: 112161
* Move the sorting of code-completion results out of the main path andDouglas Gregor2010-08-261-1/+25
| | | | | | | | | into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. Provide a libclang function that sorts the results. llvm-svn: 112149
* Add libclang API hook "clang_getIBOutletCollectionType" to query the ↵Ted Kremenek2010-08-261-0/+8
| | | | | | collection type for iboutletcollection attributes. llvm-svn: 112139
* Revert "Move the sorting of code-completion results out of the main path andDouglas Gregor2010-08-261-85/+1
| | | | | | | into the clients", because the C standard library sucks. Where's my stable sort, huh? llvm-svn: 112121
* Move the sorting of code-completion results out of the main path andDouglas Gregor2010-08-251-1/+85
| | | | | | | into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. llvm-svn: 112095
* Introduce new libclang API functions that determine the availabilityDouglas Gregor2010-08-231-1/+27
| | | | | | | of a cursor or code-completion result, e.g., whether that result refers to an unavailable, deleted, or deprecated declaration. llvm-svn: 111858
* Another step in the process of making the parser depend on Sema:John McCall2010-08-202-3/+3
| | | | | | | | | - move DeclSpec &c into the Sema library - move ParseAST into the Parse library Reflect this change in a thousand different includes. Reflect this change in the link orders. llvm-svn: 111667
* c-index-test: Diagnose parse / completion failures in -code-completion-at=.Daniel Dunbar2010-08-191-0/+8
| | | | llvm-svn: 111580
* c-index-test: As with reparse, only honor remapped false during the codeDaniel Dunbar2010-08-191-3/+1
| | | | | | | completion step with -code-completion-at=, to allow testing simulated source changes. llvm-svn: 111579
* Fix a c-index-test leak with file remappingDouglas Gregor2010-08-191-2/+3
| | | | llvm-svn: 111559
* c-index-test: Change -test-load-source-repase to only use remapped files for theDaniel Dunbar2010-08-181-3/+4
| | | | | | reparse, to allow testing distinct inputs. llvm-svn: 111448
* Reintroduce the serialization library, with fixed dependencies.Sebastian Redl2010-08-172-2/+4
| | | | llvm-svn: 111279
* Implement caching of code-completion results for macro definitionsDouglas Gregor2010-08-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | when the CXTranslationUnit_CacheCompletionResults option is given to clang_parseTranslationUnit(). Essentially, we compute code-completion results for macro definitions after we have parsed the file, then store an ASTContext-agnostic version of those results (completion string, cursor kind, priority, and active contexts) in the ASTUnit. When performing code completion in that ASTUnit, we splice the macro definition results into the results provided by the actual code-completion (which has had macros turned off) before libclang gets those results. We use completion context information to only splice in those results that make sense for that context. With a completion involving all of the macros from Cocoa.h and a few other system libraries (totally ~8500 macro definitions) living in a precompiled header, we get about a 9% performance improvement from code completion, since we no longer have to deserialize all of the macro definitions from the precompiled header. Note that macro definitions are merely the canary; the cache is designed to also support other top-level declarations, which should be a bigger performance win. That optimization will be next. Note also that there is no mechanism for determining when to throw away the cache and recompute its contents. llvm-svn: 111051
* Add an options parameter to clang_saveTranslationUnit, because we'll want it ↵Douglas Gregor2010-08-131-1/+1
| | | | | | later llvm-svn: 111016
* Implement clang_saveTranslationUnit(), which saves a translation unitDouglas Gregor2010-08-131-2/+42
| | | | | | into a PCH/AST file. llvm-svn: 111006
* Add a (currently unused) "options" parameter toDouglas Gregor2010-08-111-1/+2
| | | | | | | | | | clang_reparseTranslationUnit(), along with a function to retrieve the default recommended reparsing options for a translation unit. Also, add the CXTranslationUnit_CacheCompletionResults flag, which is also currently unused. llvm-svn: 110811
* Instead of having a specific CXTranslationUnit_* option flag forDouglas Gregor2010-08-091-1/+1
| | | | | | | | "editing" mode, introduce a separate function clang_defaultEditingTranslationUnitOptions() that retrieves the set of options. No functionality change. llvm-svn: 110613
* Fix mixed declarations and code warning.Daniel Dunbar2010-08-091-1/+1
| | | | llvm-svn: 110602
* Use precompiled preambles for in-process code completion.Douglas Gregor2010-08-091-11/+17
| | | | llvm-svn: 110596
* Give clang_codeCompleteAt() an "options" parameter, and add a newDouglas Gregor2010-08-051-1/+2
| | | | | | | | | flags enumeration + default-generating function that allows code-completion to be customized via the libclang API. Plus, turn on spell-checking when performing code completion. llvm-svn: 110319
* Add code-completion support directly to ASTUnit, which performs codeDouglas Gregor2010-08-041-5/+15
| | | | | | | | | | | | | | completion within the translation unit using the same command-line arguments for parsing the translation unit. Eventually, we'll reuse the precompiled preamble to improve code-completion performance, and this also gives us a place to cache results. Expose this function via the new libclang function clang_codeCompleteAt(), which performs the code completion within a CXTranslationUnit. The completion occurs in-process (clang_codeCompletion() runs code completion out-of-process). llvm-svn: 110210
* Add clang_isPODType() for querying if the CXType is POD. Implements ↵Ted Kremenek2010-07-301-0/+2
| | | | | | <rdar://problem/8250669>. llvm-svn: 109822
* Fix an apparent bug.Dan Gohman2010-07-261-1/+1
| | | | llvm-svn: 109447
* Start removing the use of smart pointers from the Parse/SemaDouglas Gregor2010-07-251-1/+1
| | | | | | | | interaction, by effectively defaulting to DISABLE_SMART_POINTERS. We're embracing the model where all AST nodes are ASTContext-allocated and live as long as the ASTContext lives. llvm-svn: 109374
* Basic plumbing for generating a precompiled preamble for anDouglas Gregor2010-07-231-5/+16
| | | | | | | ASTUnit/CXTranslationUnit. We can't actually use this preamble yet, however. llvm-svn: 109202
* This was still complaining about the length of the string. I've broken it hereChandler Carruth2010-07-221-1/+2
| | | | | | to try to keep as much logical grouping as possible. llvm-svn: 109085
* Slip up long string literalDouglas Gregor2010-07-201-1/+2
| | | | llvm-svn: 108838
* 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
OpenPOWER on IntegriCloud