summaryrefslogtreecommitdiffstats
path: root/clang/tools/CIndex/CIndexCodeCompletion.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename 'CIndex' to 'libclang', since it has basically become our stable publicDaniel Dunbar2010-04-301-512/+0
| | | | | | (C) API, and will likely grow further in this direction in the future. llvm-svn: 102779
* Send code completion data in json format.Ted Kremenek2010-04-171-7/+9
| | | | llvm-svn: 101586
* Add optional timing logging for code completion results. This causes a UDP ↵Ted Kremenek2010-04-151-0/+87
| | | | | | | | | packet containing the time taken for the code completion to be sent to a designated server (which is specified using a compile-time -D flag). llvm-svn: 101326
* Prune includes.Benjamin Kramer2010-04-121-0/+3
| | | | llvm-svn: 101059
* Make Diagnostic reference-counted, which is simpler than jugglingDouglas Gregor2010-04-051-2/+2
| | | | | | maybe-ownership vs. ownership. llvm-svn: 100498
* Give SourceManager a Diagnostic object with which to report errors,Douglas Gregor2010-03-161-1/+4
| | | | | | and start simplifying the interfaces in SourceManager that can fail. llvm-svn: 98594
* Revert 98439. There is a bad race condition in sys::Path::makeUnique on win32.Benjamin Kramer2010-03-131-2/+6
| | | | llvm-svn: 98452
* Make getTemporaryPath a static member of CIndexer and use it to replace ↵Benjamin Kramer2010-03-131-6/+2
| | | | | | | | tmpnam calls. This fixes linker warnings on linux. llvm-svn: 98439
* Fix bogus diagnostic format string.Daniel Dunbar2010-02-231-1/+1
| | | | llvm-svn: 96978
* Teach ASTUnit to keep track of temporary files, then delete them whenDouglas Gregor2010-02-181-2/+10
| | | | | | the ASTUnit itself is destroyed. Fixes <rdar://problem/7649385>. llvm-svn: 96628
* Re-apply my diagnostics-capture patch for CIndex, with some tweaks toDouglas Gregor2010-02-181-9/+13
| | | | | | try to address the msvc failures. llvm-svn: 96624
* Rework how CIndex handles diagnostics. Rather than using a callback,Douglas Gregor2010-02-181-14/+42
| | | | | | | | | | | | | | | | | | 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
* Convert clang_getCompletionChunkText() to return a CXString.Ted Kremenek2010-02-171-6/+8
| | | | llvm-svn: 96439
* CIndex: Fix ReportSerializedDiagnostics to honor the DiagnosticClient contractDaniel Dunbar2010-01-301-1/+7
| | | | | | | | | | that diagnostics with a source location should occur inside {Begin,End}SourceFile. Note that code completion is currently passing in an invalid LangOptions object due to its implementation, I need to sort this out with Doug. llvm-svn: 94927
* Introduce serialization and deserialization of diagnostic informationDouglas Gregor2010-01-281-4/+13
| | | | | | | | | | | | | | | | | so that CIndex can report diagnostics through the normal mechanisms even when executing Clang in a separate process. This applies both when performing code completion and when using ASTs as an intermediary for clang_createTranslationUnitFromSourceFile(). The serialized format is not perfect at the moment, because it does not encapsulate macro-instantiation information. Instead, it maps all source locations back to the instantiation location. However, it does maintain source-range and fix-it information. To get perfect fidelity from the serialized format would require serializing a large chunk of the source manager; at present, it isn't clear if this code will live long enough for that to matter. llvm-svn: 94740
* Switch the remaining diagnostic printing in CIndex over to theDouglas Gregor2010-01-281-7/+21
| | | | | | | | | 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
* Extend clang_createTranslationUnitFromSourceFile() to support creatingDouglas Gregor2010-01-231-28/+3
| | | | | | translation units that include unsaved files. llvm-svn: 94258
* Improve code completion by introducing patterns for the various C andDouglas Gregor2010-01-101-0/+20
| | | | | | | | | | | | | | | | | | | | | | C++ grammatical constructs that show up in top-level (namespace-level) declarations, member declarations, template declarations, statements, expressions, conditions, etc. For example, we now provide a pattern for static_cast<type>(expr) when we can have an expression, or using namespace identifier; when we can have a using directive. Also, improves the results of code completion at the beginning of a top-level declaration. Previously, we would see value names (function names, global variables, etc.); now we see types, namespace names, etc., but no values. llvm-svn: 93134
* Split code in CIndex.cpp into multiple source files, and remove some ↵Ted Kremenek2010-01-051-0/+351
unnecessary #includes. llvm-svn: 92756
OpenPOWER on IntegriCloud