summaryrefslogtreecommitdiffstats
path: root/clang/tools/CIndex
Commit message (Collapse)AuthorAgeFilesLines
...
* Make clang_getDeclUSR() visible.Ted Kremenek2010-01-121-1/+1
| | | | llvm-svn: 93268
* Rename clang_getUSR() -> clang_getDeclUSR(). For now we take a CXDecl ↵Ted Kremenek2010-01-121-50/+61
| | | | | | | | instead of a CXEntity. Enhance USR generation a bit with support for records. llvm-svn: 93267
* Further tweaking of USR generation. WIP.Ted Kremenek2010-01-121-6/+20
| | | | llvm-svn: 93250
* Remove trailing semicolons and silence MSVC warning about C linkage.Benjamin Kramer2010-01-121-5/+5
| | | | | | | warning C4190: 'GetEntity' has C-linkage specified, but returns UDT 'clang::idx::Entity' which is incompatible with C llvm-svn: 93237
* Remove duplicate class name, MSVC doesn't like this.Daniel Dunbar2010-01-121-1/+1
| | | | llvm-svn: 93225
* Add a boilerplate implementation for clang_getUSR(). WIP.Ted Kremenek2010-01-121-2/+80
| | | | llvm-svn: 93223
* Change clang_getUSR() to return a CXString instead of a 'const char *'.Ted Kremenek2010-01-121-2/+2
| | | | llvm-svn: 93213
* Make createCXString() a static member function of class CIndex.Ted Kremenek2010-01-122-16/+23
| | | | llvm-svn: 93212
* CIndex:Ted Kremenek2010-01-113-12/+42
| | | | | | | | | - Remove unused (and unimplemented) clang_getDeclarationName(). - Remove unused (and unimplemented) clang_getEntity(). - Add clang_getEntityFromDecl(): maps from a CXDecl to a CXEntity) - Add clang_getDeclaration(): maps from a (CXEntity, CXTranslationUnit) to a CXDecl). llvm-svn: 93209
* 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
* For now, add back clang_getDeclSource().Ted Kremenek2010-01-082-0/+8
| | | | llvm-svn: 93003
* More crashtracer enhancements to CIndex. When "popping" a crashtracer stringTed Kremenek2010-01-071-9/+15
| | | | | | restore to the one most recently created. llvm-svn: 92959
* Tidy up crashtracer logic in CIndex.Ted Kremenek2010-01-071-38/+72
| | | | llvm-svn: 92955
* Change clang_getDeclExtent() to have the endpoint point to the last ↵Ted Kremenek2010-01-061-8/+43
| | | | | | character in the last token. llvm-svn: 92869
* Add _clang_getDeclExtent to export list.Daniel Dunbar2010-01-061-0/+1
| | | | llvm-svn: 92825
* Add enhanced crash reporter breadcrumbs for ↵Ted Kremenek2010-01-061-0/+54
| | | | | | clang_createTranslationUnitFromSourceFile(). llvm-svn: 92820
* Remove deprecated function 'clang_getDeclSource()'. Use ↵Ted Kremenek2010-01-052-8/+0
| | | | | | 'clang_getDeclFile()' instead. llvm-svn: 92803
* Add C API hook 'clang_getDeclExtent()', which returns the source extent of a ↵Ted Kremenek2010-01-052-0/+20
| | | | | | declaration. This implements <rdar://problem/7280072>. llvm-svn: 92802
* Split (mostly nonexistent) USR code out from the main CIndex logic.Ted Kremenek2010-01-054-31/+50
| | | | llvm-svn: 92789
* Add back #include of 'cstdio' to hopefully unbreak the build on Linux.Ted Kremenek2010-01-051-0/+3
| | | | llvm-svn: 92765
* Split code in CIndex.cpp into multiple source files, and remove some ↵Ted Kremenek2010-01-055-473/+543
| | | | | | unnecessary #includes. llvm-svn: 92756
* Turn on code-completion for macros within CIndexDouglas Gregor2010-01-041-1/+3
| | | | llvm-svn: 92500
* Extend code-completion results with the type of each resultDouglas Gregor2009-12-181-0/+4
| | | | llvm-svn: 91702
* Change clang_codeComplete API to return the results in a structure onDouglas Gregor2009-12-182-16/+49
| | | | | | | | the heap, so that clients are not forced to copy the results during the initial iteration. A separate clang_disposeCodeCompleteResults function frees the returned results. llvm-svn: 91690
* Lift builtin-include-path logic out of ASTUnit::LoadFromCommandLine and fix ↵Daniel Dunbar2009-12-131-10/+29
| | | | | | CIndex to pass in the right directory (previously it was using the path to the main executable, which generally is wrong). llvm-svn: 91238
* clang_getCompletionChunkText() will treat optional strings as empty text blocksDouglas Gregor2009-12-101-1/+1
| | | | llvm-svn: 91072
* Document that CompilerInvocation::createDiagnostics keeps a reference to the ↵Daniel Dunbar2009-12-061-1/+2
| | | | | | DiagnosticOptions, and update callers to make sure they don't pass in a temporary. llvm-svn: 90704
* CIndex: For the time being, don't return translation units if we encounter ↵Daniel Dunbar2009-12-051-4/+14
| | | | | | | | | an error during parsing. - We need to be more careful in the rest of CIndex if we are to handle possibly-invalid ASTs, and don't have much experience with this yet. llvm-svn: 90643
* ASTUnit/CIndex: Explicitly track the top-level decls when using an ASTUnit madeDaniel Dunbar2009-12-041-1/+11
| | | | | | | | from a source file. - This allows CIndex to avoid iterating over all the top-level decls when using a PCH, which means we deserialize far fewer decls. llvm-svn: 90559
* Update test and CIndex to use -FOO BAR form for ↵Daniel Dunbar2009-12-031-3/+5
| | | | | | -{remap-file,code-completion-at}. llvm-svn: 90416
* Switch clang_createTranslationUnitFromSourceFile to use ↵Daniel Dunbar2009-12-032-3/+43
| | | | | | | | | | | | | | | | | | | ASTUnit::LoadFromCommandLine. - This is much faster, as it avoids the overhead of dumping an AST file to disk and reloading it. - For debugging purposes, there is a clang_setUseExternalASTGeneration hook which can be used to disable this. On the Sketch Cocoa app, the speedup is pretty nice, especially when using a PCH file while scanning the source: Wall time to c-index-test all files (no PCH): Old: 23.4221 New: 12.3884 Wall time to c-index-test all files (with a PCH, and "local" mode): Old: 10.9233 New: 1.9038 llvm-svn: 90385
* Fix ASTUnit to allows require a (persistent) Diagnostic object be provided; ↵Daniel Dunbar2009-12-031-20/+24
| | | | | | propogate and simplify. llvm-svn: 90379
* Normalize CIndex/c-index-test/index-test link lines in the hopes it will fixDaniel Dunbar2009-12-022-5/+15
| | | | | | | | *something*. - We really need to fix how LLVM's build systems manage linking. Pretty-please-someone-else-do-this? :) llvm-svn: 90350
* this also depends on libDriver. this almost fixes the build problems of ↵Nuno Lopes2009-12-021-1/+1
| | | | | | c-index-test llvm-svn: 90342
* Extend the CIndex code-completion API to perform code completionDouglas Gregor2009-12-021-1/+42
| | | | | | | involving unsaved files, using the -remap-file= functionality recently added to clang-cc. llvm-svn: 90314
* Switch the clang-to-CIndex interface for code-completion to a binary format, ↵Douglas Gregor2009-12-011-89/+19
| | | | | | for a massive speedup llvm-svn: 90209
* CIndex: Normalize formatting some more.Daniel Dunbar2009-12-011-70/+43
| | | | llvm-svn: 90196
* Reindent buffer, switches in particular were totally out of style.Daniel Dunbar2009-11-301-161/+159
| | | | llvm-svn: 90155
* Strip trailing space.Daniel Dunbar2009-11-301-144/+144
| | | | llvm-svn: 90154
* Change -code-completion-debug-printer to -no-code-completion-debug-printer.Daniel Dunbar2009-11-191-1/+1
| | | | | | Also, tweak a few help strings and update CompilerInvocation serialization for prev change. llvm-svn: 89317
* Add clang_getNullCursor() and clang_equalCursors() (the latter for comparing ↵Ted Kremenek2009-11-172-0/+14
| | | | | | cursors). llvm-svn: 89131
* Allow "source_filename" to be an optional argument (the client can provide ↵Ted Kremenek2009-11-171-1/+2
| | | | | | NULL). This allows the client to put the source_filename in the command_line_args without fear of the file being named twice. llvm-svn: 89118
* Sort visitor methods. No functionality change.Ted Kremenek2009-11-171-22/+24
| | | | llvm-svn: 89055
* Have clang_getCursorSource() return NULL when the source location is invalid ↵Ted Kremenek2009-11-171-2/+5
| | | | | | or refers to a built-in buffer. Implements <rdar://problem/7296243>. llvm-svn: 89044
* Move code completion options to clang-ccDaniel Dunbar2009-11-131-1/+1
| | | | llvm-svn: 87050
* Fix clang executable path for WindowsJohn Thompson2009-11-111-1/+6
| | | | llvm-svn: 86896
* CIndex: Only display diagnostics to llvm::errs() when the client has set the ↵Ted Kremenek2009-11-101-3/+3
| | | | | | 'displayDiagnostics' option to 1 in clang_createIndex(). This fixes <rdar://problem/7370691>. llvm-svn: 86700
* Make sure that we look into nested, transparent declaration contextsDouglas Gregor2009-11-091-0/+1
| | | | | | | when looking for a name within a given DeclContext. Now enumerators will show up in code-completion results. llvm-svn: 86591
* Factor CXString creation into a helper method.Benjamin Kramer2009-11-091-39/+36
| | | | llvm-svn: 86577
* Writing to a struct passed by value is pointless. Remove dead code.Benjamin Kramer2009-11-091-7/+2
| | | | | | | | - free(NULL) is a nop anyway. - if someone thinks calling clang_disposeString twice should be legal please change the method to take a pointer. llvm-svn: 86568
OpenPOWER on IntegriCloud