summaryrefslogtreecommitdiffstats
path: root/clang/include/clang-c/Index.h
Commit message (Collapse)AuthorAgeFilesLines
...
* Move CXString creation/management routines intoTed Kremenek2010-11-161-3/+1
| | | | | | | their own .cpp file and make the interpretation of its flags private. llvm-svn: 119319
* ntroduce clang_getSpellingLocation() into libclang, to provide theDouglas Gregor2010-11-091-2/+33
| | | | | | | | | | | | | | location where we're spelling a token even within a macro. clang_getInstantiationLocation() tells where we instantiated the macro. I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs, since they gloss over macro-instantiation information. Take 2: this time, adjusted tests appropriately and used a "simple" approach to the spelling location. llvm-svn: 118495
* Revert r118492, which didn't update all of its tests accordinglyDouglas Gregor2010-11-091-33/+2
| | | | llvm-svn: 118494
* Introduce clang_getSpellingLocation() into libclang, to provide theDouglas Gregor2010-11-091-2/+33
| | | | | | | | | | | location where we're spelling a token even within a macro. clang_getInstantiationLocation() tells where we instantiated the macro. I'm still not thrilled with the CXSourceLocation/CXSourceRange APIs, since they gloss over macro-instantiation information. llvm-svn: 118492
* Clean up some of the comments in Index.h (e.g., misnamed or extra parameters ↵Ted Kremenek2010-11-081-15/+13
| | | | | | | | in comments). Patch by Chris Pick! llvm-svn: 118403
* libclang: Add clang_executeOnThread, for use in c-index-test (and only there,Daniel Dunbar2010-11-041-0/+3
| | | | | | preferably). Good thing c-index-test is written in C!!!! llvm-svn: 118223
* Added cursor visitor that takes a block as an argument. Tested compilingDavid Chisnall2010-11-031-0/+23
| | | | | | | libclang with both clang -fblocks and gcc (no blocks support). Only exposed in the header to compilers that do have blocks support. llvm-svn: 118170
* Introduce libclang-level options for C++ precompiled preambles,Douglas Gregor2010-10-271-1/+16
| | | | | | separating out chaining precompiled preambles from non-chaining ones. llvm-svn: 117457
* Extend the preprocessing record and libclang with support forDouglas Gregor2010-10-201-1/+8
| | | | | | | | | inclusion directives, keeping track of every #include, #import, etc. in the translation unit. We keep track of the source location and kind of the inclusion, how the file name was spelled, and the underlying file to which the inclusion resolved. llvm-svn: 116952
* Add clang_getLocationForOffset() to libclang, for gives a source location ↵David Chisnall2010-10-151-0/+7
| | | | | | from a character index into a file. llvm-svn: 116587
* Eliminate clang_codeComplete(). libclang clients should be using theDouglas Gregor2010-10-111-94/+1
| | | | | | faster, in-process, more-configurable clang_codeCompleteAt(). llvm-svn: 116245
* Eliminate clang_setUseExternalASTGeneration() from libclang. BetweenDouglas Gregor2010-10-111-12/+0
| | | | | | | | | improvements to the compiler and the introduction of crash recovery, it no longer makes sense to allow this mode. Moreover, this eliminates one use of the "clang" executable from within libclang; we'd like them all to go away. llvm-svn: 116207
* Introduce a new libclang function, clang_getCursorDisplayName(), whichDouglas Gregor2010-10-021-0/+9
| | | | | | | | produces a simple "display" name that captures the arguments/parameters for a function, function template, class template, or class template specialization. llvm-svn: 115428
* Extend libclang with an API that determines, given a C++ virtualDouglas Gregor2010-10-011-1/+53
| | | | | | | member function or an Objective-C method, which other member functions/methods it overrides. llvm-svn: 115338
* Implement libclang API functions for retrieving the lexical andDouglas Gregor2010-09-221-0/+67
| | | | | | semantic parents of the given cursor. llvm-svn: 114587
* Introduce a new kind of cursor into libclang, which covers a referenceDouglas Gregor2010-09-131-1/+67
| | | | | | | | | to an "overloaded" set of declarations. This cursor kind works for unresolved references to functions/templates (e.g., a call within a template), using declarations, and Objective-C class and protocol forward declarations. llvm-svn: 113805
* Add libclang support for label statements, gotos, and taking theDouglas Gregor2010-09-101-5/+35
| | | | | | address of a label (GNU extension). llvm-svn: 113564
* Teach libclang to walk the base and member initializers of aDouglas Gregor2010-09-091-3/+8
| | | | | | | | constructor, in source order. Also introduces a new reference kind for class members, which is used here (for member initializers) and will also be used for designated initializers and offsetof. llvm-svn: 113545
* Introduce a new libclang function,Douglas Gregor2010-09-021-0/+30
| | | | | | | | | 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 libclang support for using declarations. Clang actually usesDouglas Gregor2010-09-011-1/+3
| | | | | | | | | | | | | | | | three different kinds of AST nodes to represent using declarations: UsingDecl, UnresolvedUsingValueDecl, and UnresolvedUsingTypenameDecl. These three are collapsed into a single cursor kind for using declarations, since libclang clients don't need the distinction. Several related changes here: - Cursor visitation of the three AST nodes for using declarations - Proper source-range computation for these AST nodes - Using declarations have no USRs, since they don't actually declare any entities. llvm-svn: 112730
* Make it clear that libclang does not modify the command-line argumentsDouglas Gregor2010-09-011-3/+3
| | | | | | it is given. llvm-svn: 112717
* Implement libclang support for using directives (cursor + visitation +Douglas Gregor2010-09-011-1/+4
| | | | | | | | suppressing USRs). Also, fix up the source location information for using directives so that the declaration location refers to the namespace name. llvm-svn: 112693
* Add libclang support for namespace aliases (visitation + USRs) alongDouglas Gregor2010-08-311-3/+8
| | | | | | | | | | | with a new cursor kind for a reference to a namespace. There's still some oddities in the source location information for NamespaceAliasDecl that I'll address with a separate commit, so the source locations displayed in the load-namespaces.cpp test will change. llvm-svn: 112676
* Add a new libclang function clang_getTemplateCursorKind(), whichDouglas Gregor2010-08-311-1/+21
| | | | | | | | | | | determines the kind of declaration that would be generated if the given template were instantiated. This allows a client to distinguish among class/struct/union templates and function/member function/static member function templates. Also, teach clang_CXXMethod_isStatic() about function templates. llvm-svn: 112655
* Extend libclang with a new cursor kind that indicates a reference to aDouglas Gregor2010-08-311-1/+6
| | | | | | | | | template. Such cursors occur, for example, in template specialization types such as vector<int>. Note that we do not handle the super-interesting case where the template name is unresolved, e.g., within a template. llvm-svn: 112636
* Add libclang support for class template partial specializations,Douglas Gregor2010-08-311-1/+3
| | | | | | including a cursor kind, visitation, and USRs. llvm-svn: 112629
* Add a libclang cursor kind, visitation support and USR support for C++Douglas Gregor2010-08-311-1/+4
| | | | | | class templates. llvm-svn: 112627
* Implement basic support for indexing function templates inDouglas Gregor2010-08-311-1/+9
| | | | | | | | | | | | | | libclang. This includes: - Cursor kind for function templates, with visitation logic - Cursor kinds for template parameters, with visitation logic - Visitation logic for template specialization types, qualified type locations - USR generation for function templates, template specialization types, template parameter types. Also happens to fix PR7804, which I tripped across while testing. llvm-svn: 112604
* libclang indexing support for C++ constructors, destructors, andDouglas Gregor2010-08-311-2/+7
| | | | | | | | conversion functions. This introduces new cursor kinds for these three C++ entities, and reworks visitation of function declarations so that we get type-source information for the names. llvm-svn: 112600
* Implement CXCursor support for walking C++ base specifiers. This includes ↵Ted Kremenek2010-08-271-1/+25
| | | | | | | | adding the API hooks clang_isVirtualBase() and clang_getCXXAccessSpecifier() to query properties of the base specifier. Implements <rdar://problem/8274883>. llvm-svn: 112296
* Fix copy-paste in doxygen comment.Ted Kremenek2010-08-271-1/+1
| | | | llvm-svn: 112295
* Move the sorting of code-completion results out of the main path andDouglas Gregor2010-08-261-0/+11
| | | | | | | | | | | 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-11/+0
| | | | | | 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-0/+11
| | | | | | | | | 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-1/+19
| | | | | | collection type for iboutletcollection attributes. llvm-svn: 112139
* Silence warning about C++-style comments.Peter Collingbourne2010-08-241-7/+15
| | | | llvm-svn: 111875
* Introduce new libclang API functions that determine the availabilityDouglas Gregor2010-08-231-1/+35
| | | | | | | of a cursor or code-completion result, e.g., whether that result refers to an unavailable, deleted, or deprecated declaration. llvm-svn: 111858
* Add an options parameter to clang_saveTranslationUnit, because we'll want it ↵Douglas Gregor2010-08-131-1/+32
| | | | | | later llvm-svn: 111016
* Implement clang_saveTranslationUnit(), which saves a translation unitDouglas Gregor2010-08-131-0/+20
| | | | | | into a PCH/AST file. llvm-svn: 111006
* Add a (currently unused) "options" parameter toDouglas Gregor2010-08-111-3/+44
| | | | | | | | | | 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-21/+24
| | | | | | | | "editing" mode, introduce a separate function clang_defaultEditingTranslationUnitOptions() that retrieves the set of options. No functionality change. llvm-svn: 110613
* Use precompiled preambles for in-process code completion.Douglas Gregor2010-08-091-1/+13
| | | | llvm-svn: 110596
* Give clang_codeCompleteAt() an "options" parameter, and add a newDouglas Gregor2010-08-051-1/+35
| | | | | | | | | 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-1/+71
| | | | | | | | | | | | | | 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/+6
| | | | | | <rdar://problem/8250669>. llvm-svn: 109822
* Basic plumbing for generating a precompiled preamble for anDouglas Gregor2010-07-231-8/+36
| | | | | | | ASTUnit/CXTranslationUnit. We can't actually use this preamble yet, however. llvm-svn: 109202
* Introduce a new C API function, clang_parseTranslationUnit(), whichDouglas Gregor2010-07-211-0/+77
| | | | | | | | | will eventually replace clang_createTranslationUnitFromSourceFile(). The only addition in clang_parseTranslationUnit() is a set of flags that can control how the translation unit is loaded. More interesting flags will be coming. llvm-svn: 109027
* Introduce a new libclang API, clang_reparseTranslationUnit(), whichDouglas Gregor2010-07-191-0/+38
| | | | | | | | 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 CXType support for querying the return type of Objective-C methods. ↵Ted Kremenek2010-06-211-1/+7
| | | | | | | | 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-1/+8
| | | | | | | | includes adding a new function, clang_getResultType(), which returns the result type of the function type. llvm-svn: 106459
OpenPOWER on IntegriCloud