summaryrefslogtreecommitdiffstats
path: root/include/clang-c
Commit message (Collapse)AuthorAgeFilesLines
* Added a flag to the parser to skip method bodies.Erik Verbruggen2012-04-121-1/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154584 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement clang_getDiagnosticCategoryText() to provide a way for a client of ↵Ted Kremenek2012-04-121-2/+23
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154567 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce a couple of functions to make it convenientArgyrios Kyrtzidis2012-04-111-2/+18
| | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154523 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce clang_Cursor_getObjCSelectorIndex() function.Argyrios Kyrtzidis2012-03-301-0/+14
| | | | | | | | | | After getting a cursor with clang_getCursor for a particular source location, allows querying the cursor in order to find out if the location points to a selector identifier in an objc method or message expression, and which selector index it is. rdar://11158946 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153781 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce clang_Cursor_getSpellingNameRange().Argyrios Kyrtzidis2012-03-301-0/+15
| | | | | | | | | | | It retrieves a source range for a piece that forms the cursors spelling name. Most of the times there is only one range for the complete spelling but for objc methods and objc message expressions, there are multiple pieces for each selector identifier. Part of rdar://11113120 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153775 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce options to control the priority for the threadsArgyrios Kyrtzidis2012-03-281-0/+55
| | | | | | | | | | | | | | | | | | | | | | that libclang creates. -Introduce CXGlobalOptFlags enum for the new options that can be set on the CXIndex object. -CXGlobalOpt_ThreadBackgroundPriorityForIndexing affects: clang_indexSourceFile clang_indexTranslationUnit clang_parseTranslationUnit clang_saveTranslationUnit -CXGlobalOpt_ThreadBackgroundPriorityForEditing affects: clang_reparseTranslationUnit clang_codeCompleteAt clang_annotateTokens rdar://9075282 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153562 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a new libclang API to determine the parent context of a codeDouglas Gregor2012-03-271-0/+20
| | | | | | | | | | completion item. For example, if the code completion itself represents a declaration in a namespace (say, std::vector), then this API retrieves the cursor kind and name of the namespace (std). Implements <rdar://problem/11121951>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153545 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce indexing option CXIndexOpt_SuppressWarnings, whichArgyrios Kyrtzidis2012-03-271-1/+6
| | | | | | | | disables all compiler warnings. rdar://11059556 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153539 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Enhance clang_getOverriddenCursors.Argyrios Kyrtzidis2012-03-081-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | Basically the current design is: -for an implementation method, show as overridden the interface method. This is not useful, and is inconsistent with the C++ side -for an interface method, show as overridden the protocols methods (this is desirable) and the methods from the categories; methods from categories are not useful since they are considered the same method (same USR). -If there is a protocol method or category method reported, it does not check the super class for overridden methods. This is really problematic since overridden methods from super class is what we want to give back. Change clang_getOverriddenCursors to show as overridden any method in the class's base class, its protocols, or its categories' protocols, that has the same selector and is of the same kind (class or instance). If no such method exists, the search continues to the class's superclass, its protocols, and its categories, and so on. A method from an Objective-C implementation is considered to override the same methods as its corresponding method in the interface. rdar://10967206 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152270 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-061-0/+14
| | | | | | | | | | | the new Objective-C NSArray/NSDictionary/NSNumber literal syntax. This introduces a new library, libEdit, which provides a new way to support migration of code that improves on the original ARC migrator. We now believe that most of its functionality can be refactored into the existing libraries, and thus this new library may shortly disappear. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152141 91177308-0d34-0410-b5e6-96231b3b80d8
* And libclang cursor/indexing support for new Objective-C ↵Ted Kremenek2012-03-061-1/+5
| | | | | | NSArray/NSDictionary/NSNumber literals. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152138 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] When indexing an objc property, also provide information aboutArgyrios Kyrtzidis2012-02-281-0/+9
| | | | | | | | the getter/setter objc method entities that the property is associated with. rdar://10244558 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151634 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't record nested macro expansions in the preprocessing record,Argyrios Kyrtzidis2012-02-251-22/+1
| | | | | | | | it can only bring pain when dealing with preprocessor abuse (see: boost). rdar://10898986 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151427 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement indexing support for lambdas in libclang (both kinds), asDouglas Gregor2012-02-151-2/+22
| | | | | | | | well as improving the RecursiveASTVisitor's walk of lambda expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150549 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing: only index implicit template instantiations via an ↵Argyrios Kyrtzidis2012-02-141-1/+7
| | | | | | opt-in indexing option. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150517 91177308-0d34-0410-b5e6-96231b3b80d8
* make: fix installation of generated header filesDylan Noblesmith2012-02-011-0/+5
| | | | | | | | | | | | | The PROJ_SRC_DIR != PROJ_OBJ_DIR path was missing the directory creation logic that was in the path for non-generated headers. PR11903. (The oversight was copied and pasted from LLVM's Makefile.rules, where it apparently existed since time immemorial til it was corrected in r127325.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149551 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: Mark clang_Cursor_isNull with CINDEX_LINKAGE to make it available ↵Benjamin Kramer2012-02-011-1/+1
| | | | | | | | on windows. Patch by Timothy J Fontaine! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149533 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add CXIndexOpt_IndexFunctionLocalSymbols indexing option to indicateArgyrios Kyrtzidis2012-01-141-1/+7
| | | | | | that one wants indexing callbacks for function-local symbols as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148160 91177308-0d34-0410-b5e6-96231b3b80d8
* Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" ↵Benjamin Kramer2011-12-231-1/+1
| | | | | | | | so this patch is surprisingly small. Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147221 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing API: provide an attribute list inside CXIdxEntityInfoArgyrios Kyrtzidis2011-12-151-13/+15
| | | | | | so that we can access the attributes of an entity for a reference. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146616 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing API: Provide the protocols list for objc categories as well.Argyrios Kyrtzidis2011-12-131-7/+8
| | | | | | rdar://10573361 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146498 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing API: Fix indexing of missed references.Argyrios Kyrtzidis2011-12-131-2/+3
| | | | | | rdar://10567864&10567916 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146497 91177308-0d34-0410-b5e6-96231b3b80d8
* Add clang_getDiagnosticSetFromTU() to libclang. Fixes ↵Ted Kremenek2011-12-091-0/+9
| | | | | | <rdar://problem/10553081>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146287 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing API: provide both the semantic and the lexical container.Argyrios Kyrtzidis2011-12-071-2/+7
| | | | | | They are generally the same except in C++ cases like out-of-line member functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146069 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce CXIdxEntityLanguage that indicates the languageArgyrios Kyrtzidis2011-12-071-2/+9
| | | | | | of an indexed entity. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146067 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] API enhancements by Joe Groff!Argyrios Kyrtzidis2011-12-061-4/+107
| | | | | | | | | | | | | - Exposes a CXType_Vector type kind for vector types. - Adds generalized versions of the clang_getArrayElementType and clang_getArraySize functions, named clang_getElementType and clang_getNumElements, which work on array, vector, or complex types. - Adds additional functions for querying function types. clang_isFunctionTypeVariadic returns true if a function type is variadic. clang_getFunctionCallingConv returns an enumeration value indicating the calling convention of the function type. clang_getNumArgTypes returns the number of static argument types, and clang_getArgType gets the type of an argument. - Adds a clang_getTypedefDeclUnderlyingType function to get the underlying type from a TypedefDecl cursor. - Adds a clang_getEnumDeclIntegerType function to get the integer type from an EnumDecl cursor. - Adds clang_getEnumConstantDeclValue and clang_getEnumConstantDeclUnsignedValue functions to get the value of an EnumConstantDecl as a signed or unsigned long long, respectively. - Exposes a CXCursor_AsmLabelAttr cursor kind for __asm__("label") attributes. - Alters clang_getCursorSpelling to return the label value for AsmLabelAttr-kind cursors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145972 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] When indexing a field in a C++ class, return an entityArgyrios Kyrtzidis2011-12-051-1/+2
| | | | | | of kind CXIdxEntity_CXXInstanceVariable. rdar://10522503. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145859 91177308-0d34-0410-b5e6-96231b3b80d8
* include/clang*/Makefile: Tweak installation to work with CLANG_SRCDIR.NAKAMURA Takumi2011-12-051-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145800 91177308-0d34-0410-b5e6-96231b3b80d8
* Install c-index-test and clang-c/Index.h as internal files. rdar://10217046Bob Wilson2011-11-281-4/+6
| | | | | | | | | Specify that these files should be installed to the optional internal install location as specified by configure's --with-internal-prefix. If that option is not used, they'll be installed to the default prefix as before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145235 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing API: Support C++ symbols.Argyrios Kyrtzidis2011-11-221-11/+106
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145058 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Indexing API:Argyrios Kyrtzidis2011-11-181-6/+33
| | | | | | | | | -For indexDeclaration, also pass the declaration attributes as an array of cursors. -Rename CXIndexOpt_OneRefPerFile -> CXIndexOpt_SuppressRedundantRefs, and only pass a reference if a declaration/definition does not exist in the file. -Other fixes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144942 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce a new function to apply the indexing callbacks on an ↵Argyrios Kyrtzidis2011-11-151-4/+42
| | | | | | | | existing CXTranslationUnit, mainly to be used for indexing a PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144623 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Slight changes to the indexing API and bigger internal changes ↵Argyrios Kyrtzidis2011-11-141-16/+21
| | | | | | for it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144577 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Further simplify the indexing API.Argyrios Kyrtzidis2011-11-121-208/+44
| | | | | | | That stuff can be added later on if we need them. Also add some const goodness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144446 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some typos, grammar errors, etc. in cursor kind descriptionsDouglas Gregor2011-11-111-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144412 91177308-0d34-0410-b5e6-96231b3b80d8
* include/clang-c/Index.h: Update CINDEX_LINKAGE on 6 decls. Corresponds to ↵NAKAMURA Takumi2011-11-111-5/+6
| | | | | | libclang.exports in r144343 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144357 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Simplify the indexing API.Argyrios Kyrtzidis2011-11-111-295/+100
| | | | | | | | Cut down the number of callbacks to more generic ones. Clients can check an enum to find out what kind of declaration it is and they can call functions to get more specific information than the generic provided info. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144343 91177308-0d34-0410-b5e6-96231b3b80d8
* serialized diagnostics: implement full deserialization of clang diagnostics ↵Ted Kremenek2011-11-101-0/+80
| | | | | | | | via the libclang API. I've tested it on simple cases and it works. Test cases to follow as well as a few tweaks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144269 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment typosDouglas Gregor2011-11-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144120 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Add comments.Argyrios Kyrtzidis2011-10-271-0/+339
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143111 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Index implicit property references.Argyrios Kyrtzidis2011-10-181-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142355 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce a new high level API for indexing clients that assumesArgyrios Kyrtzidis2011-10-171-0/+323
| | | | | | | | | more of the work involved in indexing a translation unit and simplifies client implementations. Only C/ObjC for now, C++ (and comments) to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142233 91177308-0d34-0410-b5e6-96231b3b80d8
* Added clang_getCompletionAnnotation and clang_getCompletionNumAnnotations toErik Verbruggen2011-10-141-2/+28
| | | | | | | retrieve annotations from completion string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141953 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow for annotate attributes after access specifiers. When suchErik Verbruggen2011-10-131-1/+2
| | | | | | | | attributes are found, propagate them to subsequent declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141861 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Removed accidental addition of CXCursor_AnnotateAttr.Erik Verbruggen2011-10-061-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141292 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Fix symbol export for clang_Range_isNull so MSVC won't complain.Erik Verbruggen2011-10-061-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141282 91177308-0d34-0410-b5e6-96231b3b80d8
* Added CXAvailability_NotAccessible to indicate that a declaration is ↵Erik Verbruggen2011-10-061-1/+6
| | | | | | available, but not accessible from the current code completion context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141278 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce clang_findReferencesInFile which accepts a cursor, a file,Argyrios Kyrtzidis2011-10-061-0/+48
| | | | | | | | and a callback and finds all identifier references of the cursor in the file. rdar://7948304 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141277 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose more statement, expression, and declaration kinds in libclang,Douglas Gregor2011-10-051-3/+326
| | | | | | | from Manuel Holtgrewe! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141200 91177308-0d34-0410-b5e6-96231b3b80d8
* [libclang] Introduce CXCursor_CXXAccessSpecifier for C++'s ↵Argyrios Kyrtzidis2011-09-301-2/+5
| | | | | | | | public:/private:/protected: specifiers. Patch by Paolo Capriotti! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140864 91177308-0d34-0410-b5e6-96231b3b80d8