aboutsummaryrefslogtreecommitdiff
path: root/clang/tools/c-index-test/c-index-test.c
AgeCommit message (Collapse)AuthorFilesLines
2013-12-05[libclang] Record ranges skipped by the preprocessor and expose them with ↵Argyrios Kyrtzidis1-0/+14
libclang. Patch by Erik Verbruggen! llvm-svn: 196487
2013-12-05[c-index-test] Enhance perform_test_reparse_source() to allow remapping a fileArgyrios Kyrtzidis1-12/+77
at a particular reparsing iteration. Passing '-remap-file-1=from:to' will remap the files in the second iteration. llvm-svn: 196486
2013-12-05[c-index-test] For the '-remap-file=' option use ':' instead of ';' for ↵Argyrios Kyrtzidis1-7/+7
separator. lldb does not like semicolon as part of an option. llvm-svn: 196485
2013-10-11[libclang] Introduce clang_Type_getCXXRefQualifier whichexposes ↵Argyrios Kyrtzidis1-0/+5
ref-qualifier information of function type. Patch by Che-Liang Chiou! llvm-svn: 192493
2013-07-22Revert commit 186833 (no longer needed after the fix in 186859).Enea Zaffanella1-83/+46
llvm-svn: 186872
2013-07-22c-index-test.c: Let this C89-compliant since r186817.NAKAMURA Takumi1-46/+83
warning: initializer for aggregate is not a compile-time constant [-Wc99-extensions] llvm-svn: 186833
2013-07-05[libclang] Introduce clang_Cursor_isObjCOptional, which returns whether the ↵Argyrios Kyrtzidis1-1/+3
declaration was affected by "@optional" rdar://14348525. llvm-svn: 185722
2013-05-17libclang: add a function to check whether a member function is pure virtualDmitri Gribenko1-1/+2
Patch by Seth Fowler. llvm-svn: 182139
2013-04-26[libclang] Introduce clang_Module_getASTFile function that returns the ↵Argyrios Kyrtzidis1-3/+8
module file where a module object came from. rdar://13743084 llvm-svn: 180643
2013-04-26[PCH/modules] Require the preprocessing record option to match the used PCH, ↵Argyrios Kyrtzidis1-0/+1
if modules are enabled. The preprocessing record becomes important when modules are enabled, since it is used to calculate the module cache hash. llvm-svn: 180635
2013-04-18[libclang] Introduce clang_Cursor_isVariadic, which returns non-zero if the ↵Argyrios Kyrtzidis1-0/+3
given cursor is a variadic function or method. rdar://13667150 llvm-svn: 179819
2013-04-18[libclang] Introduce clang_Cursor_getObjCDeclQualifiers, to query for 'ObjC ↵Argyrios Kyrtzidis1-0/+16
Qualifiers' written next to the return and parameter types in an ObjC method declarations. rdar://13676977 llvm-svn: 179816
2013-04-18[libclang] Introduce clang_Cursor_getObjCPropertyAttributes to query the ↵Argyrios Kyrtzidis1-0/+22
written attributes in a property declaration. rdar://13684512 llvm-svn: 179803
2013-04-11[libclang] Have clang_getCXXAccessSpecifier() also return the access control ↵Argyrios Kyrtzidis1-0/+17
of a C++ declaration within its parent scope. Suggested by Stefan Seefeld. llvm-svn: 179297
2013-04-11[libclang] Expose record layout info via new libclang functions:Argyrios Kyrtzidis1-0/+59
clang_Type_getAlignOf clang_Type_getSizeOf clang_Type_getOffsetOf clang_Cursor_isBitField Patch by Loïc Jaquemet! llvm-svn: 179251
2013-04-09[c-index-test] Enable 'display diagnostics' when using the -test-load ↵Argyrios Kyrtzidis1-2/+2
functionality. llvm-svn: 179123
2013-03-13[Modules] Resolve top-headers of modules lazily.Argyrios Kyrtzidis1-2/+2
This allows resolving top-header filenames of modules to FileEntries when we need them, not eagerly. Note that that this breaks ABI for libclang functions clang_Module_getTopLevelHeader / clang_Module_getNumTopLevelHeaders but this is fine because they are experimental and not widely used yet. llvm-svn: 176975
2013-03-11[libclang] Fix a test and a warning on windows.Argyrios Kyrtzidis1-1/+1
Patch by Guy Benyei! llvm-svn: 176806
2013-03-08[libclang] Introduce clang_findIncludesInFile, that can be used to retrieve ↵Argyrios Kyrtzidis1-1/+97
all #import/#include directives in a specific file. It passes to the visitor, that the caller provides, CXCursor_InclusionDirective cursors for all the include directives in a particular file. llvm-svn: 176682
2013-03-01Fix typos: [Dd]iagnosic -> [Dd]iagnosticStefanus Du Toit1-8/+8
These all appear in comments or (ironically) diagnostics output. llvm-svn: 176383
2013-02-15libclang: add clang_getTypeSpelling(CXType CT)Dmitri Gribenko1-17/+21
Adds a function clang_getTypeSpelling(CXType CT) that returns a CXString containing the underlying type. Patch by Ben Gertzfield. llvm-svn: 175299
2012-12-17[c-index-test] Fix warnings about unused results from chdir().Argyrios Kyrtzidis1-3/+11
Patch from Edwin Vane! llvm-svn: 170366
2012-12-06[libclang] Introduce a new indexing mode where we skip function bodiesArgyrios Kyrtzidis1-1/+8
that were already parsed in the same "indexing session". An indexing session is defined as using the same CXIndexAction object for multiple clang_indexSourceFile calls. Passing CXIndexOpt_SkipParsedBodiesInSession as an indexing option will enable the mode where we try to skip bodies that were already parsed in another translation unit. If a function's body was skipped, the "flags" field in the CXIdxDeclInfo structure will have "CXIdxDeclFlag_Skipped" bit was set. llvm-svn: 169539
2012-12-05[c-index-test] Introduce '-index-compile-db' which accepts a compilation ↵Argyrios Kyrtzidis1-66/+197
database file and does an '-index-file' for all compile commands in the database. llvm-svn: 169430
2012-12-04c-index-test.c: Make C89-compliant.NAKAMURA Takumi1-1/+2
llvm-svn: 169277
2012-12-04libclang: Add a function to libclang for retrieving the bit width valueDmitri Gribenko1-0/+21
Patch by Jyun-Yan You. llvm-svn: 169276
2012-11-01[libclang] Introduce clang_Cursor_getReceiverType which returns the CXType forArgyrios Kyrtzidis1-0/+6
the receiver of an ObjC message expression. rdar://12578643 llvm-svn: 167201
2012-10-24c-index-test.c: Split a format string. [-Woverlength-strings]NAKAMURA Takumi1-1/+2
FIXME: They are still long strings without formatter in printf(3)! llvm-svn: 166636
2012-10-24[libclang] Add "-index-file-full" option that recursively indexes any importedArgyrios Kyrtzidis1-2/+74
modules/PCH files. llvm-svn: 166605
2012-10-18[libclang] Invoke a ppIncludedFile callback when indexing implicit module ↵Argyrios Kyrtzidis1-1/+2
imports. llvm-svn: 166161
2012-10-12c-index-test.c: /* Use C style comment. */NAKAMURA Takumi1-1/+1
llvm-svn: 165797
2012-10-11[libclang] Make sure the index_data.main_filename field is initializedArgyrios Kyrtzidis1-0/+2
in c-index-test. index_enteredMainFile is not invoked when indexing a module file. llvm-svn: 165735
2012-10-11[libclang] Add tests for indexing modules and PCHs using modules.Argyrios Kyrtzidis1-1/+1
llvm-svn: 165732
2012-10-11[libclang] Improve AST serialization done by ASTUnit::Save().Argyrios Kyrtzidis1-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
2012-10-05[libclang] Now that we have a CXModule object, pass it to theArgyrios Kyrtzidis1-5/+8
importedASTFile indexing callback. llvm-svn: 165281
2012-10-05[libclang] Introduce new C functions that provide information about modules:Argyrios Kyrtzidis1-0/+19
clang_Cursor_getModule clang_Module_getParent clang_Module_getName clang_Module_getFullName clang_Module_getNumTopLevelHeaders clang_Module_getTopLevelHeader llvm-svn: 165280
2012-10-03[libclang] Simplify indexing of module imports by handling implicitArgyrios Kyrtzidis1-4/+3
imports via ImportDecls. llvm-svn: 165160
2012-10-02[libclang] Even though we disable the preprocessing record during indexing,Argyrios Kyrtzidis1-1/+2
make sure that it gets enabled for when a module needs to be created. llvm-svn: 165021
2012-10-02[libclang] Implement the importedASTFile indexing callback to provideArgyrios Kyrtzidis1-1/+19
info about imported modules. llvm-svn: 165020
2012-09-10Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.Dmitri Gribenko1-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
2012-08-31Fix the build (-Wswitch violation introduced by r163013).David Blaikie1-0/+1
llvm-svn: 163025
2012-08-30Fix C++ comment in C sourceMichael Liao1-1/+1
llvm-svn: 162887
2012-08-22[libclang] c-index-test: Make the printing of the overrides list of a cursor inArgyrios Kyrtzidis1-1/+22
a deterministic order, to avoid random test failures. llvm-svn: 162408
2012-08-10Fix a couple of pedantic gcc warnings.Benjamin Kramer1-2/+2
llvm-svn: 161656
2012-08-07libclang API for comment-to-xml conversion.Dmitri Gribenko1-25/+129
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
2012-07-31Comment parsing: add support for \tparam command on all levels.Dmitri Gribenko1-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
2012-07-30c-index-test: remove dead store. Found by Clang static analyzer!Dmitri Gribenko1-1/+0
llvm-svn: 160974
2012-07-23Comment AST: add InlineContentComment::RenderKind to specify a defaultDmitri Gribenko1-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
2012-07-20Fix c-index-test to compile as C89.Dmitri Gribenko1-8/+14
llvm-svn: 160582
2012-07-20Add libclang APIs to walk comments ASTs and an API to convert a comment to anDmitri Gribenko1-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