summaryrefslogtreecommitdiffstats
path: root/clang/include/clang-c
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix Doxygen misuse: refer to parameter names in paragraphs correctly (\arg isDmitri Gribenko2012-09-131-3/+3
| | | | | | not what most people want -- it starts a new paragraph). llvm-svn: 163793
* Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp.Dmitri Gribenko2012-09-101-5/+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
* Revert r163099 per chandlerc's request.Joao Matos2012-09-041-3/+1
| | | | llvm-svn: 163147
* Added a new cursor for SEHLeaveStmt to libclang.Joao Matos2012-09-031-1/+3
| | | | llvm-svn: 163099
* Normalize line endings of r163013 (part 2).Joao Matos2012-08-311-8/+8
| | | | llvm-svn: 163032
* Improved MSVC __interface support by adding first class support for it, ↵Joao Matos2012-08-311-7/+8
| | | | | | instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins. llvm-svn: 163013
* [ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt.Chad Rosier2012-08-251-2/+2
| | | | | | No functional change intended. llvm-svn: 162632
* Fix a bunch of -Wdocumentation warnings.Dmitri Gribenko2012-08-231-3/+3
| | | | llvm-svn: 162452
* libclang API for comment-to-xml conversion.Dmitri Gribenko2012-08-071-0/+15
| | | | | | | | | | | | 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 to HTML conversion: correct typo in CSS class name: taram -> tparamDmitri Gribenko2012-08-011-1/+1
| | | | llvm-svn: 161145
* Comment parsing: add support for \tparam command on all levels.Dmitri Gribenko2012-07-311-4/+78
| | | | | | | | | | 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
* Comment AST: add InlineContentComment::RenderKind to specify a defaultDmitri Gribenko2012-07-231-0/+36
| | | | | | | | 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 a typo (the the => the)Sylvestre Ledru2012-07-231-1/+1
| | | | llvm-svn: 160622
* Comment to HTML conversion: add more CSS classes to identify function argumentsDmitri Gribenko2012-07-211-2/+6
| | | | | | | by index. This is useful if the user does not document all arguments, and we can't find a particular argument by index via :nth-of-type() CSS selector. llvm-svn: 160595
* Add libclang APIs to walk comments ASTs and an API to convert a comment to anDmitri Gribenko2012-07-201-2/+399
| | | | | | | | | | | 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
* [libclang] CompilationDatabase naming and comment fixesArnaud A. de Grandmaison2012-07-031-19/+22
| | | | llvm-svn: 159682
* [libclang] Introduce clang_Cursor_isDynamicCall which,Argyrios Kyrtzidis2012-07-021-0/+13
| | | | | | | | | | | | | 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-2/+23
| | | | | | | | | | | | | | | | 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
* [libclang] add CompilationDatabase supportArnaud A. de Grandmaison2012-06-301-0/+143
| | | | llvm-svn: 159484
* Factor CXString out of Index.hArnaud A. de Grandmaison2012-06-283-54/+109
| | | | | | | No functionnal or interface change. This is done to prepare the landing of CompilationDatabase in libclang. llvm-svn: 159382
* Implement a lexer for structured comments.Dmitri Gribenko2012-06-261-0/+6
| | | | llvm-svn: 159223
* Structured comment parsing, first step.Dmitri Gribenko2012-06-201-0/+13
| | | | | | | | | * 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
* Documentation cleanup for clang-c:James Dennett2012-06-151-74/+88
| | | | | | | | | | | | | | | * Add parameter names to various \param commands; * Ensure that \brief summaries are followed by blank lines where needed to prevent subsequent text being merged into the summary; * Mark code examples with \code...\endcode so that they're appropriately formatted by Doxygen. * Add qualification for links to field of structs (specifically callbacks); * Escape #, @ and < as needed to avoid them being interpreted by Doxygen; * Remove incorrect uses of "\see name", preferring #name; * Fix a glitchy "\param Returns..." to be "\returns"; * Fix parameter names given to \param, typos and otherwise. llvm-svn: 158489
* Etch out the code path for MS-style inline assembly.Chad Rosier2012-06-111-0/+4
| | | | llvm-svn: 158325
* Documentation cleanup, fixing Doxygen markup. Mostly this avoids common termsJames Dennett2012-06-111-7/+7
| | | | | | | | | | | | | | such as "protocol" and "expression" being implicitly turned into links to mistakenly-generated Doxygen pages: - Escaping @ symbols when Doxygen would otherwise incorrectly interpret them; - Escaping # symbols when they're not intended as explicit Doxygen link requests, such as when discussing preprocessor directives; - In one odd case, unescaping @ in @__experimental_modules_import, because Doxygen wrote '\@' to the output in that case, causing the example in the description of ImportDecl to be wrong; and - Fixing a typo: @breif -> @brief. llvm-svn: 158299
* Fix typos found by http://github.com/lyda/misspell-checkBenjamin Kramer2012-06-021-1/+1
| | | | llvm-svn: 157886
* Introduce a new libclang API to determine the platform availability ofDouglas Gregor2012-05-081-1/+113
| | | | | | | | 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
* Simple typo fix (syntex to syntax). Fixes PR12735Aaron Ballman2012-05-061-2/+2
| | | | llvm-svn: 156259
* Added a flag to the parser to skip method bodies.Erik Verbruggen2012-04-121-1/+10
| | | | llvm-svn: 154584
* 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. llvm-svn: 154567
* [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 llvm-svn: 154523
* [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 llvm-svn: 153781
* [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 llvm-svn: 153775
* [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 llvm-svn: 153562
* 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>. llvm-svn: 153545
* [libclang] Introduce indexing option CXIndexOpt_SuppressWarnings, whichArgyrios Kyrtzidis2012-03-271-1/+6
| | | | | | | | disables all compiler warnings. rdar://11059556 llvm-svn: 153539
* [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 llvm-svn: 152270
* 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. llvm-svn: 152141
* And libclang cursor/indexing support for new Objective-C ↵Ted Kremenek2012-03-061-1/+5
| | | | | | NSArray/NSDictionary/NSNumber literals. llvm-svn: 152138
* [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 llvm-svn: 151634
* 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 llvm-svn: 151427
* 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. llvm-svn: 150549
* [libclang] Indexing: only index implicit template instantiations via an ↵Argyrios Kyrtzidis2012-02-141-1/+7
| | | | | | opt-in indexing option. llvm-svn: 150517
* 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.) llvm-svn: 149551
* 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! llvm-svn: 149533
* [libclang] Add CXIndexOpt_IndexFunctionLocalSymbols indexing option to indicateArgyrios Kyrtzidis2012-01-141-1/+7
| | | | | | that one wants indexing callbacks for function-local symbols as well. llvm-svn: 148160
* 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. llvm-svn: 147221
* [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. llvm-svn: 146616
* [libclang] Indexing API: Provide the protocols list for objc categories as well.Argyrios Kyrtzidis2011-12-131-7/+8
| | | | | | rdar://10573361 llvm-svn: 146498
* [libclang] Indexing API: Fix indexing of missed references.Argyrios Kyrtzidis2011-12-131-2/+3
| | | | | | rdar://10567864&10567916 llvm-svn: 146497
OpenPOWER on IntegriCloud