summaryrefslogtreecommitdiffstats
path: root/clang/include/clang-c
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement clang_isUnexposed(), a predicate function to simplify filtering outTed Kremenek2010-03-081-0/+6
| | | | | | unexposed AST elements. llvm-svn: 97985
* Add clang_getCursorLinkage(), which returns theTed Kremenek2010-03-031-0/+26
| | | | | | | underlying linkage for the entity referred to by a CXCursor. llvm-svn: 97646
* When given unsaved files in clang_createTranslationUnitFromSourceFile,Douglas Gregor2010-02-271-4/+2
| | | | | | | | | | copy the source buffers provided rather than referencing them directly, so that the caller can free those buffers immediately after calling clang_createTranslationUnitFromSourceFile(). Otherwise, we risk hitting those buffers later (when building source ranges, forming diagnostics, etc.). llvm-svn: 97296
* Rework the CIndex API for displaying diagnostics. Instead of printingDouglas Gregor2010-02-221-7/+6
| | | | | | | the diagnostics to a FILE*, return a CXString containing the formatted diagnostic. llvm-svn: 96823
* Simplify the CIndex fix-it API, now that we have half-open CXSourceRanges.Douglas Gregor2010-02-191-79/+21
| | | | llvm-svn: 96685
* Re-apply my diagnostics-capture patch for CIndex, with some tweaks toDouglas Gregor2010-02-181-4/+79
| | | | | | try to address the msvc failures. llvm-svn: 96624
* Revert my CIndex diagnostic changes (r96603, 96606, 96607), which wereDouglas Gregor2010-02-181-79/+4
| | | | | | breaking the msvc9 builder for unknown reasons. llvm-svn: 96618
* Introduce debugging/testing hook clang_enableStackTraces() intoDouglas Gregor2010-02-181-2/+2
| | | | | | | CIndex, so that c-index-test to use it to call lvm::sys::PrintStackTraceOnErrorSignal(). llvm-svn: 96607
* Resurrect the displayDiagnostics parameter to clang_createIndex(), andDouglas Gregor2010-02-181-3/+4
| | | | | | | display captured diagnostics when we can't return an invalid CXTranslationUnit. llvm-svn: 96606
* Introduce CIndex API functions for displaying a diagnostic, with someDouglas Gregor2010-02-181-0/+74
| | | | | | | | | | | knobs to control formatting. Eventually, I'd like to merge the implementation of this code with the TextDiagnosticPrinter, so that it's easy for CIndex clients to produce beautiful diagnostics like the clang compiler does. Use this new function to display diagnostics within c-index-test. llvm-svn: 96603
* Rework how CIndex handles diagnostics. Rather than using a callback,Douglas Gregor2010-02-181-17/+41
| | | | | | | | | | | | | | | | | | we attach diagnostics to translation units and code-completion results, so they can be queried at any time. To facilitate this, the new StoredDiagnostic class stores a diagnostic in a serializable/deserializable form, and ASTUnit knows how to capture diagnostics in this stored form. CIndex's CXDiagnostic is a thin wrapper around StoredDiagnostic, providing a C interface to stored or de-serialized diagnostics. I've XFAIL'd one test case temporarily, because currently we end up storing diagnostics in an ASTUnit that's never returned to the user (because it contains errors). I'll introduce a temporary fix for this soon; the real fix will be to allow us to return and query invalid ASTs. llvm-svn: 96592
* Start adding cursor kinds for attributes, with first exposingTed Kremenek2010-02-181-1/+13
| | | | | | IBActionAttr and IBOutletAttr respectively. llvm-svn: 96563
* Fix comment.Daniel Dunbar2010-02-171-2/+2
| | | | llvm-svn: 96468
* Convert clang_getCompletionChunkText() to return a CXString.Ted Kremenek2010-02-171-1/+1
| | | | llvm-svn: 96439
* Change clang_getCursorKindSpelling() to return a CXStringTed Kremenek2010-02-171-1/+1
| | | | | | instead of a 'const char *'. llvm-svn: 96425
* Change clang_getFileName() to return a 'CXString' instead of 'const char *'.Ted Kremenek2010-02-171-1/+1
| | | | llvm-svn: 96424
* CIndex: Switch CXSourceRange to proper half-open intervals.Daniel Dunbar2010-02-141-1/+1
| | | | | | - Doug, please review. llvm-svn: 96162
* Make the following functions thread-safe but having them return an ↵Ted Kremenek2010-02-121-1/+1
| | | | | | | | | | | | std::string that is reconstructed every time they are called: getClangRevision() getClangFullRepositoryVersion() getClangFullVersion() llvm-svn: 96033
* Clean up the CIndex interface to diagnostic ranges. Thanks, Daniel!Douglas Gregor2010-02-081-17/+13
| | | | llvm-svn: 95602
* Note that a CXIndex cannot be destroyed until after all of its translation ↵Douglas Gregor2010-02-081-0/+7
| | | | | | units have been destroyed llvm-svn: 95598
* Switch the remaining diagnostic printing in CIndex over to theDouglas Gregor2010-01-281-8/+13
| | | | | | | | | diagnostic callback mechanism, so all diagnostics now go through that callback. Also, eliminate the displayDiagnostics flag to clang_createIndex(), since it is no longer necessary: the client determines whether to display diagnostics or not. llvm-svn: 94714
* Implement a diagnostics callback for the C interface to Clang, so thatDouglas Gregor2010-01-281-56/+286
| | | | | | | | | | | | | | | | | | | | | | | | | clients can format diagnostics as they wish rather than having to parse standard error. All of the important parts of the front end's diagnostics are exposed: text, severity, location, source ranges, and fix-its. The diagnostics callback is now available with clang_createTranslationUnitFromSource() and clang_createTranslationUnit(). As part of this change, CXSourceLocation and CXSourceRange got one pointer larger, since we need to hold on to the SourceManager and LangOptions structures in the source location. This is the minimum amount of information needed for the functions that operate on source locations and ranges (as implemented now). Previously we held on to the ASTContext, but the diagnostics callback can end up with source locations when there is no ASTContext (or preprocessor). Still to do: - Code completion needs to support the diagnostics callback, once we have the ability to (de-)serialize diagnostics. - Eliminate the "displayDiagnostics" argument to createIndex; we'll always pass diagnostics to the callback and let it deal with display. llvm-svn: 94709
* Implement 'clang_getInclusions()' in CIndex. This API allows clients to ↵Ted Kremenek2010-01-261-0/+32
| | | | | | walk the set of files included in a translation unit via the C API. llvm-svn: 94575
* Eliminate clang_getInstantiationLocationOffset(), and instead add anDouglas Gregor2010-01-261-21/+7
| | | | | | offset parameter to clang_getInstantiationLocation(). llvm-svn: 94573
* Implement clang_annotateTokens(), which associates cursors with eachDouglas Gregor2010-01-261-5/+22
| | | | | | | of the tokens within a raw token stream. This does not even attempt to handle macros yet. llvm-svn: 94561
* Introduce a CIndex API for lexing the raw tokens within a given sourceDouglas Gregor2010-01-261-0/+119
| | | | | | range. The token-annotation function does nothing, yet. llvm-svn: 94551
* Introduce clang_getInstantiationLocationOffset(), which decomposes aDouglas Gregor2010-01-261-0/+18
| | | | | | source location in file + offset. llvm-svn: 94497
* Update comment.Daniel Dunbar2010-01-251-2/+3
| | | | llvm-svn: 94393
* Tweak clang_visitChildren comment.Daniel Dunbar2010-01-241-3/+1
| | | | llvm-svn: 94360
* Index.h: Tweak comments, delete trailing whitespace, fix a few typos, etc.Daniel Dunbar2010-01-241-140/+144
| | | | llvm-svn: 94351
* Add doxygen comment to clang_getClangVersion().Ted Kremenek2010-01-231-1/+5
| | | | llvm-svn: 94311
* Extend clang_createTranslationUnitFromSourceFile() to support creatingDouglas Gregor2010-01-231-5/+13
| | | | | | translation units that include unsaved files. llvm-svn: 94258
* Add 'clang_getClangVersion()' function to CIndex. This exposes the full ↵Ted Kremenek2010-01-221-0/+13
| | | | | | Clang version string through the CIndex API. llvm-svn: 94242
* Improve content and structure of the Doxygen documentation for theDouglas Gregor2010-01-221-267/+401
| | | | | | CIndex API. No functionality change. llvm-svn: 94234
* Yet more CIndex API cleanup:Douglas Gregor2010-01-221-5/+60
| | | | | | | | - Added more routines to manipulate/compare source locations and ranges - Switched clang_getCursor() over to take a CXSourceLocation rather than file/line/column. llvm-svn: 94226
* Introduce type references into the C API, capturing references toDouglas Gregor2010-01-211-1/+17
| | | | | | typedefs only (for now). llvm-svn: 94078
* Stash a CXXUnit pointer into each cursor. This allows us to simplifyDouglas Gregor2010-01-201-5/+4
| | | | | | | the interface to clang_visitChildren() by eliminating the CXTranslationUnit pointer. llvm-svn: 94051
* Yet more Doxygen-comment tweaking in the CIndex library.Douglas Gregor2010-01-201-17/+52
| | | | llvm-svn: 94044
* Improve Doxygen documentation for the CIndex library, somewhat.Douglas Gregor2010-01-201-13/+57
| | | | llvm-svn: 94042
* Kill CXEntity and CXDecl. The first has never been used, while theDouglas Gregor2010-01-201-20/+0
| | | | | | second has been wholly replaced by cursors. llvm-svn: 94039
* Kill some CXDecl-related APIs that have been superceded byDouglas Gregor2010-01-201-9/+0
| | | | | | CXCursor-based APIs. llvm-svn: 94037
* Kill CXStmt. It isn't being used anywhere, and has no future.Douglas Gregor2010-01-201-1/+0
| | | | llvm-svn: 94036
* Kill clang_loadDeclaration() and clang_loadTranslationUnit().Douglas Gregor2010-01-201-53/+4
| | | | llvm-svn: 94034
* Introduce a new, cursor-based traversal function that visits theDouglas Gregor2010-01-201-0/+69
| | | | | | | | | | | | children of a given cursor, regardless of what kind of cursor it is. This is a generalization of clang_loadDeclaration and clang_loadTranslationUnit that will also extent to statements, expressions, etc. As proof-of-concept, switched clang_loadDeclaration() from its own visitor over to an instance of this traversal function internally. llvm-svn: 94022
* Attempt to improve CIndex Doxygen organization, although I can't actually ↵Douglas Gregor2010-01-201-9/+18
| | | | | | test this locally llvm-svn: 93961
* Kill off clang_getDeclColumn, clang_getDeclExtent, clang_getDeclLine,Douglas Gregor2010-01-201-11/+0
| | | | | | | clang_getDeclSource, and clang_getDeclSourceFile; the cursor equivalents are the way of the future. llvm-svn: 93955
* Introduce a special cursor kind for the translation unit, to serve asDouglas Gregor2010-01-201-2/+18
| | | | | | | | | the root of the conceptual cursor hierarchy (just like we do with declarations). This will be used when we get to unify clang_loadTranslationUnit() and clang_loadDeclaration() into something more generally useful. llvm-svn: 93954
* CXCursor_UnexposedDecl to the first declaration kindDouglas Gregor2010-01-201-12/+12
| | | | llvm-svn: 93952
* Kill CXCursor_ObjCSelectorRef, CXCursor_VarRef, CXCursor_FunctionRef,Douglas Gregor2010-01-191-6/+1
| | | | | | | and CXCursor_EnumConstantRef; they've been subsumed by expression references, which do a much nicer job. llvm-svn: 93947
* Extend the CIndex API with direct support for expressions andDouglas Gregor2010-01-191-1/+51
| | | | | | | | | | statements, moving some of the more unnatural kinds of references (VarRef, EnumConstantRef, etc.) over to the expressions. We can now poke at arbitrary expressions and statements with, e.g., clang_getCursor() and get back useful information (e.g., source ranges). llvm-svn: 93946
OpenPOWER on IntegriCloud