summaryrefslogtreecommitdiffstats
path: root/clang/include/clang-c
Commit message (Collapse)AuthorAgeFilesLines
...
* libclang: Allow callers of clang_saveTranslationUnit() to distinguishDouglas Gregor2011-07-061-2/+38
| | | | | | | between different classes of errors. Addresses most of <rdar://problem/9660328>. llvm-svn: 134495
* Improve the Python bindings for libclang in a few ways, from EliDouglas Gregor2011-07-061-0/+5
| | | | | | | | | | | | | | | | | Bendersky. Specifically: * Implemented a new function in libclang: clang_isAttribute * Fixing TranslationUnit.get_includes to only go through the argument * buffer when it contains something. This fixed a crash on Windows * clang_getFileName returns CXString, not char*. Made appropriate * fixes in cindex.py - now the relevant tests pass and we can see the * full locations correctly again (previously there was garbage in * place of the file name) * Exposed clang_getCursorDisplayName to the python bindings llvm-svn: 134460
* Expose @synthesize and @dynamic via their own cursor kinds inDouglas Gregor2011-06-031-1/+5
| | | | | | libclang. Fixes <rdar://problem/9537904>. llvm-svn: 132603
* Add clang_CXXMethod_isVirtual() to libclang, from Erik Verbruggen!Douglas Gregor2011-05-121-0/+7
| | | | llvm-svn: 131230
* Introduce a new libclang parsing flag,Douglas Gregor2011-05-061-1/+12
| | | | | | | | | | | | | CXTranslationUnit_NestedMacroInstantiations, which indicates whether we want to see "nested" macro instantiations (e.g., those that occur inside other macro instantiations) within the detailed preprocessing record. Many clients (e.g., those that only care about visible tokens) don't care about this information, and in code that uses preprocessor metaprogramming, this information can have a very high cost. Addresses <rdar://problem/9389320>. llvm-svn: 130990
* Enhance clang_getCXTUResourceUsage() to return the amount of memory used by ↵Ted Kremenek2011-05-041-2/+4
| | | | | | the Preprocessor's bump allocator as well as those from the PreprocessingRecord. llvm-svn: 130823
* Introduce a new libclang API, clang_isFileMultipleIncludeGuarded(),Douglas Gregor2011-05-041-0/+8
| | | | | | | | which determines whether a particular file is actually a header that is intended to be guarded from multiple inclusions within the same translation unit. llvm-svn: 130808
* Enhance clang_getCXTUResourceUsage() to report the sizes of the memory ↵Ted Kremenek2011-04-281-4/+5
| | | | | | buffers used by PCH. llvm-svn: 130460
* Enhance clang_getCXTUResourceUsage() to report how much memory is used by ↵Ted Kremenek2011-04-281-2/+4
| | | | | | SourceManager's memory buffers. llvm-svn: 130433
* Enhance clang_getCXTUResourceUsage() to report the amount of memory used by ↵Ted Kremenek2011-04-281-2/+3
| | | | | | ASTContext's side tables. llvm-svn: 130383
* Enhance clang_getCXTUResourceUsage() to report the amount of memory used by ↵Ted Kremenek2011-04-281-2/+3
| | | | | | SourceManager's content cache allocator. llvm-svn: 130380
* Rename 'CXTUMemoryUsage…' to 'CXTUResourceUsage…'.Ted Kremenek2011-04-201-19/+25
| | | | llvm-svn: 129857
* Report memory usage for global code completion results in CXTUMemoryUsage.Ted Kremenek2011-04-181-1/+2
| | | | llvm-svn: 129733
* Add libclang API to query how much memory is used by a CXTranslationUnit. ↵Ted Kremenek2011-04-181-1/+50
| | | | | | | | This is a WIP. Currently we report the amount used for expressions, types, identifiers, and selectors. llvm-svn: 129730
* Support for C++11 (non-template) alias declarations.Richard Smith2011-04-151-2/+4
| | | | llvm-svn: 129567
* Add libclang hook 'clang_toggleCrashRecovery()', which provides a mechanism ↵Ted Kremenek2011-03-181-0/+9
| | | | | | for a client to enable/disable CrashRecovery within libclang function calls. llvm-svn: 127920
* Mention libclang in the Doxygen documentationDouglas Gregor2011-02-231-1/+1
| | | | llvm-svn: 126316
* Add libclang functions to determine the const/volatile/restrictDouglas Gregor2011-01-271-0/+18
| | | | | | qualifiers on a CXType. Patch from Stefan Seefeld, test by me. llvm-svn: 124377
* Expose Objective-C type encodings of declarations to libclang users. This ↵David Chisnall2010-12-301-0/+4
| | | | | | also adds a method in ASTContext which encodes FunctionDecls using the same encoding format that is used for Objective-C methods. llvm-svn: 122639
* Teach clang_getCursorSemanticParent() andDouglas Gregor2010-12-211-0/+5
| | | | | | | | clang_getCursorLexicalParent() to cope with class and function templates, along with the parent of the translation unit. Fixes PR8761 and PR8766. llvm-svn: 122324
* Add new libclang hooks for CXCursorSet, aTed Kremenek2010-12-081-1/+32
| | | | | | | DenseMap-backed hashtable for doing client-side management of CXCursors within a set. llvm-svn: 121318
* Implement a simple hash function for libclang cursorsDouglas Gregor2010-11-201-0/+5
| | | | llvm-svn: 119876
* Implement clang_getCanonicalCursor() in libclang, which does the obvious thing.Douglas Gregor2010-11-191-0/+26
| | | | llvm-svn: 119874
* Extend the libclang diagnostic API to provide information about theDouglas Gregor2010-11-191-5/+65
| | | | | | option name, category ID, and category name corresponding to a diagnostic. llvm-svn: 119802
* Make definition of CXTranslationUnitImpl privateTed Kremenek2010-11-171-4/+1
| | | | | | to libclang. llvm-svn: 119585
* Change CXTranslationUnit to not directly cast to an ASTUnit*,Ted Kremenek2010-11-161-2/+5
| | | | | | | | | | | | | | | | | | | but to wrap both an ASTUnit and a "string pool" that will be used for fast USR generation. This requires a bunch of mechanical changes, as there was a ton of code that assumed that CXTranslationUnit and ASTUnit* were the same. Along with this change, introduce CXStringBuf, which provides an llvm::SmallVector<char> backing for repeatedly generating CXStrings without a huge amount of malloc() traffic. This requires making some changes to the representation of CXString by renaming a few fields (but keeping the size of the object the same). llvm-svn: 119337
* 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
OpenPOWER on IntegriCloud