summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test
Commit message (Collapse)AuthorAgeFilesLines
...
* [c-index-test] Introduce '-index-compile-db' which accepts a compilation ↵Argyrios Kyrtzidis2012-12-051-66/+197
| | | | | | | | database file and does an '-index-file' for all compile commands in the database. llvm-svn: 169430
* c-index-test.c: Make C89-compliant.NAKAMURA Takumi2012-12-041-1/+2
| | | | llvm-svn: 169277
* libclang: Add a function to libclang for retrieving the bit width valueDmitri Gribenko2012-12-041-0/+21
| | | | | | Patch by Jyun-Yan You. llvm-svn: 169276
* Force C89 for c-index-test.cDmitri Gribenko2012-11-071-0/+7
| | | | | | | | | | | MSVC supports only C89, so it is important to keep c-index-test.c buildable with C89. However, Clang defaults to C99, so while building Clang with Clang one can introduce C99 constructs into c-index-test.c without noticing. Thanks to Nakamura Takumi for helping with MSVC bits. llvm-svn: 167561
* [c-index-test] Do install c-index-test because it's not just for tests,Argyrios Kyrtzidis2012-11-061-3/+0
| | | | | | it's also setup as 'INTERNAL_TOOL'. llvm-svn: 167432
* [libclang] Introduce clang_Cursor_getReceiverType which returns the CXType forArgyrios Kyrtzidis2012-11-011-0/+6
| | | | | | | | the receiver of an ObjC message expression. rdar://12578643 llvm-svn: 167201
* c-index-test.c: Split a format string. [-Woverlength-strings]NAKAMURA Takumi2012-10-241-1/+2
| | | | | FIXME: They are still long strings without formatter in printf(3)! llvm-svn: 166636
* [libclang] Add "-index-file-full" option that recursively indexes any importedArgyrios Kyrtzidis2012-10-241-2/+74
| | | | | | modules/PCH files. llvm-svn: 166605
* [libclang] Invoke a ppIncludedFile callback when indexing implicit module ↵Argyrios Kyrtzidis2012-10-181-1/+2
| | | | | | imports. llvm-svn: 166161
* c-index-test.c: /* Use C style comment. */NAKAMURA Takumi2012-10-121-1/+1
| | | | llvm-svn: 165797
* [libclang] Make sure the index_data.main_filename field is initializedArgyrios Kyrtzidis2012-10-111-0/+2
| | | | | | | in c-index-test. index_enteredMainFile is not invoked when indexing a module file. llvm-svn: 165735
* [libclang] Add tests for indexing modules and PCHs using modules.Argyrios Kyrtzidis2012-10-111-1/+1
| | | | llvm-svn: 165732
* [libclang] Improve AST serialization done by ASTUnit::Save().Argyrios Kyrtzidis2012-10-111-1/+5
| | | | | | | | | The ASTUnit needs to initialize an ASTWriter at the beginning of parsing to fully handle serialization of a translation unit that imports modules. Do this by introducing an option to enable it, which corresponds to CXTranslationUnit_ForSerialization on the C API side. llvm-svn: 165717
* [libclang] Now that we have a CXModule object, pass it to theArgyrios Kyrtzidis2012-10-051-5/+8
| | | | | | importedASTFile indexing callback. llvm-svn: 165281
* [libclang] Introduce new C functions that provide information about modules:Argyrios Kyrtzidis2012-10-051-0/+19
| | | | | | | | | | | clang_Cursor_getModule clang_Module_getParent clang_Module_getName clang_Module_getFullName clang_Module_getNumTopLevelHeaders clang_Module_getTopLevelHeader llvm-svn: 165280
* [libclang] Simplify indexing of module imports by handling implicitArgyrios Kyrtzidis2012-10-031-4/+3
| | | | | | imports via ImportDecls. llvm-svn: 165160
* [libclang] Even though we disable the preprocessing record during indexing,Argyrios Kyrtzidis2012-10-021-1/+2
| | | | | | make sure that it gets enabled for when a module needs to be created. llvm-svn: 165021
* [libclang] Implement the importedASTFile indexing callback to provideArgyrios Kyrtzidis2012-10-021-1/+19
| | | | | | info about imported modules. llvm-svn: 165020
* Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.Dmitri Gribenko2012-09-101-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we have a list of all commands. This is a good thing in itself, but it also enables us to easily implement typo correction for command names. With this change we have objects that contain information about each command, so it makes sense to resolve command name just once during lexing (currently we store command names as strings and do a linear search every time some property value is needed). Thus comment token and AST nodes were changed to contain a command ID -- index into a tables of builtin and registered commands. Unknown commands are registered during parsing and thus are also uniformly assigned an ID. Using an ID instead of a StringRef is also a nice memory optimization since ID is a small integer that fits into a common bitfield in Comment class. This change implies that to get any information about a command (even a command name) we need a CommandTraits object to resolve the command ID to CommandInfo*. Currently a fresh temporary CommandTraits object is created whenever it is needed since it does not have any state. But with this change it has state -- new commands can be registered, so a CommandTraits object was added to ASTContext. Also, in libclang CXComment has to be expanded to include a CXTranslationUnit so that all functions working on comment AST nodes can get a CommandTraits object. This breaks binary compatibility of CXComment APIs. Now clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC) doesn't need TU parameter anymore, so it was removed. This is a source-incompatible change for this C API. llvm-svn: 163540
* Fix the build (-Wswitch violation introduced by r163013).David Blaikie2012-08-311-0/+1
| | | | llvm-svn: 163025
* Fix C++ comment in C sourceMichael Liao2012-08-301-1/+1
| | | | llvm-svn: 162887
* [libclang] c-index-test: Make the printing of the overrides list of a cursor inArgyrios Kyrtzidis2012-08-221-1/+22
| | | | | | a deterministic order, to avoid random test failures. llvm-svn: 162408
* Fix a couple of pedantic gcc warnings.Benjamin Kramer2012-08-101-2/+2
| | | | llvm-svn: 161656
* c-arcmt-test, c-index-test: Appease Cygwin, to link to libclang.a, not ↵NAKAMURA Takumi2012-08-101-1/+6
| | | | | | clang.dll. llvm-svn: 161655
* c-index-test Makefile: fix build on Linux. Reviewed by Eric Christopher.Dmitri Gribenko2012-08-071-2/+2
| | | | llvm-svn: 161439
* libclang API for comment-to-xml conversion.Dmitri Gribenko2012-08-073-25/+139
| | | | | | | | | | | | The implementation also includes a Relax NG schema and tests for the schema itself. The schema is used in c-index-test to verify that XML documents we produce are valid. In order to do the validation, we add an optional libxml2 dependency for c-index-test. Credits for CMake part go to Doug Gregor. Credits for Autoconf part go to Eric Christopher. Thanks! llvm-svn: 161431
* Comment parsing: add support for \tparam command on all levels.Dmitri Gribenko2012-07-311-0/+17
| | | | | | | | | | The only caveat is renumbering CXCommentKind enum for aesthetic reasons -- this breaks libclang binary compatibility, but should not be a problem since API is so new. This also fixes PR13372 as a side-effect. llvm-svn: 161087
* Include clang-check as part of the clang installation.David Blaikie2012-07-312-2/+3
| | | | | | | | | | This also tidies up a couple of other tools we were (partially) installing: * c-index-test was being installed but shouldn't be (it's just a clang-dev tool) * diagtool was being installed in cmake but not make (& shouldn't be installed in either) Review by Manuel Klimek, Doug Gregor, and Chandler Carruth. llvm-svn: 161073
* c-index-test: remove dead store. Found by Clang static analyzer!Dmitri Gribenko2012-07-301-1/+0
| | | | llvm-svn: 160974
* Comment AST: add InlineContentComment::RenderKind to specify a defaultDmitri Gribenko2012-07-231-0/+14
| | | | | | | | rendering mode for clients that don't want to interpret Doxygen commands. Also add a libclang API to query this information. llvm-svn: 160633
* Fix c-index-test to compile as C89.Dmitri Gribenko2012-07-201-8/+14
| | | | llvm-svn: 160582
* Add libclang APIs to walk comments ASTs and an API to convert a comment to anDmitri Gribenko2012-07-201-21/+202
| | | | | | | | | | | HTML fragment. For testing, c-index-test now has even more output: * HTML rendering of a comment * comment AST tree dump in S-expressions like Comment::dump(), but implemented * with libclang APIs. llvm-svn: 160577
* Fix some memory leaks found by the static analyzer. Thanks to John Smith for ↵Richard Smith2012-07-051-3/+8
| | | | | | running it over Clang. llvm-svn: 159732
* [libclang] CompilationDatabase naming and comment fixesArnaud A. de Grandmaison2012-07-031-9/+9
| | | | llvm-svn: 159682
* [libclang] Introduce clang_Cursor_isDynamicCall which,Argyrios Kyrtzidis2012-07-021-0/+3
| | | | | | | | | | | | | given a cursor pointing to a C++ method call or an ObjC message, returns non-zero if the method/message is "dynamic", meaning: For a C++ method: the call is virtual. For an ObjC message: the receiver is an object instance, not 'super' or a specific class. rdar://11779185 llvm-svn: 159627
* Add a new libclang completion API to get brief documentation comment that isDmitri Gribenko2012-07-021-0/+14
| | | | | | | | | | | | | | | | attached to a declaration in the completion string. Since extracting comments isn't free, a new code completion option is introduced. A new code completion option that enables including brief comments into CodeCompletionString should be a, err, code completion option. But because ASTUnit caches global declarations during parsing before even completion consumer is created, the option is duplicated as a translation unit option (in both libclang and ASTUnit, like the option to cache code completion results). llvm-svn: 159539
* c-index-test/Makefile: Tweak USEDLIBS for cygwin. cygclang.dll is not linked ↵NAKAMURA Takumi2012-07-011-0/+1
| | | | | | to c-index-test yet. llvm-svn: 159499
* c-index-test.c: Fix missing semicolon(s).NAKAMURA Takumi2012-06-301-2/+2
| | | | llvm-svn: 159486
* [libclang] add CompilationDatabase supportArnaud A. de Grandmaison2012-06-301-1/+106
| | | | llvm-svn: 159484
* Implement a lexer for structured comments.Dmitri Gribenko2012-06-261-16/+34
| | | | llvm-svn: 159223
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-211-2/+4
| | | | | | | | | express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. llvm-svn: 158888
* Fix a big layering violation introduced by r158771.Chandler Carruth2012-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | That commit added a new library just to hold the RawCommentList. I've started a discussion on the commit thread about whether that is really meritted -- it certainly doesn't seem necessary at this stage. However, the immediate problem is that the AST library has a hard dependency on the Comment library, but the dependencies were set up completely backward. In addition to the layering violation, this had an unfortunate effect if scattering the Comments library dependency throughout the build system, but inconsistently so -- several parts of the CMake dependencies were missing and only showed up due to transitive deps or the fact that the target wasn't being built by tho bots. It turns out that the Comments library can't (currently) be a well formed layer *below* the AST library either, as it has an API that accepts an ASTContext. That parameter is currently unused, so maybe that was a mistake? Anyways, it really seems like this is logically part of the AST -- that's the whole point of the ASTContext providing access to it as far as I can tell -- so I've merged it into the AST library to solve the immediate layering violation problems and remove some of the churn from our library dependencies. llvm-svn: 158807
* Structured comment parsing, first step.Dmitri Gribenko2012-06-202-2/+21
| | | | | | | | | * Retain comments in the AST * Serialize/deserialize comments * Find comments attached to a certain Decl * Expose raw comment text and SourceRange via libclang llvm-svn: 158771
* Introduce a new libclang API to determine the platform availability ofDouglas Gregor2012-05-081-1/+63
| | | | | | | | a given entity, so that we can tell when the entity was introduced/deprecated/obsoleted on each platform for which we have an annotation. Addresses <rdar://problem/11365715>. llvm-svn: 156347
* c-index-test: dispose spelling string after use.Benjamin Kramer2012-04-141-0/+1
| | | | llvm-svn: 154738
* Kill the last vestiges of clangIndexDouglas Gregor2012-04-131-1/+1
| | | | llvm-svn: 154675
* Added a flag to the parser to skip method bodies.Erik Verbruggen2012-04-121-0/+2
| | | | llvm-svn: 154584
* Implement clang_getDiagnosticCategoryText() to provide a way for a client of ↵Ted Kremenek2012-04-121-2/+8
| | | | | | | | | libclang to accurately get the diagnostic category name from a serialized diagnostic when the version of libclang used to read the diagnostic file is newer than the clang that emitted the diagnostic file. llvm-svn: 154567
* [libclang] Apparently it's important to build in C89, sigh..Argyrios Kyrtzidis2012-04-111-1/+2
| | | | llvm-svn: 154525
* [libclang] Introduce a couple of functions to make it convenientArgyrios Kyrtzidis2012-04-111-0/+16
| | | | | | | | | | | to get at the parameters (and their types) of a function or objc method cursor. int clang_Cursor_getNumArguments(CXCursor C); CXCursor clang_Cursor_getArgument(CXCursor C, unsigned i); rdar://11201527 llvm-svn: 154523
OpenPOWER on IntegriCloud