Ted Kremenek
991eb3f6c0
Add enhanced crash reporter breadcrumbs for clang_createTranslationUnitFromSourceFile().
...
llvm-svn: 92820
2010-01-06 03:42:32 +00:00
Ted Kremenek
bde648030b
Remove deprecated function 'clang_getDeclSource()'. Use 'clang_getDeclFile()' instead.
...
llvm-svn: 92803
2010-01-05 23:21:30 +00:00
Ted Kremenek
a44d99c934
Add C API hook 'clang_getDeclExtent()', which returns the source extent of a declaration. This implements <rdar://problem/7280072>.
...
llvm-svn: 92802
2010-01-05 23:18:49 +00:00
Ted Kremenek
9cd9f6d861
Split (mostly nonexistent) USR code out from the main CIndex logic.
...
llvm-svn: 92789
2010-01-05 22:06:45 +00:00
Ted Kremenek
902292d7ac
Add back #include of 'cstdio' to hopefully unbreak the build on Linux.
...
llvm-svn: 92765
2010-01-05 20:55:39 +00:00
Ted Kremenek
0ec2cca8f2
Split code in CIndex.cpp into multiple source files, and remove some unnecessary #includes.
...
llvm-svn: 92756
2010-01-05 19:32:54 +00:00
Douglas Gregor
51af7f628c
Turn on code-completion for macros within CIndex
...
llvm-svn: 92500
2010-01-04 19:45:17 +00:00
Douglas Gregor
b3fa919c2d
Extend code-completion results with the type of each result
...
llvm-svn: 91702
2009-12-18 18:53:37 +00:00
Douglas Gregor
f72b6ac87f
Change clang_codeComplete API to return the results in a structure on
...
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
2009-12-18 16:20:58 +00:00
Daniel Dunbar
8d4a202aad
Lift builtin-include-path logic out of ASTUnit::LoadFromCommandLine and fix CIndex to pass in the right directory (previously it was using the path to the main executable, which generally is wrong).
...
llvm-svn: 91238
2009-12-13 03:46:13 +00:00
Douglas Gregor
01ddf7a65f
clang_getCompletionChunkText() will treat optional strings as empty text blocks
...
llvm-svn: 91072
2009-12-10 22:46:19 +00:00
Daniel Dunbar
1597da4c05
Document that CompilerInvocation::createDiagnostics keeps a reference to the DiagnosticOptions, and update callers to make sure they don't pass in a temporary.
...
llvm-svn: 90704
2009-12-06 09:56:30 +00:00
Daniel Dunbar
72fe5b1bcc
CIndex: For the time being, don't return translation units if we encounter 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
2009-12-05 02:17:18 +00:00
Daniel Dunbar
644dca07b9
ASTUnit/CIndex: Explicitly track the top-level decls when using an ASTUnit made
...
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
2009-12-04 08:17:33 +00:00
Daniel Dunbar
3eff927255
Update test and CIndex to use -FOO BAR form for -{remap-file,code-completion-at}.
...
llvm-svn: 90416
2009-12-03 05:32:40 +00:00
Daniel Dunbar
1108966959
Switch clang_createTranslationUnitFromSourceFile to use 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
2009-12-03 01:54:28 +00:00
Daniel Dunbar
59203007ac
Fix ASTUnit to allows require a (persistent) Diagnostic object be provided; propogate and simplify.
...
llvm-svn: 90379
2009-12-03 01:45:44 +00:00
Daniel Dunbar
845a87bd04
Normalize CIndex/c-index-test/index-test link lines in the hopes it will fix
...
*something*.
- We really need to fix how LLVM's build systems manage
linking. Pretty-please-someone-else-do-this? :)
llvm-svn: 90350
2009-12-02 21:47:55 +00:00
Nuno Lopes
8dc27496c0
this also depends on libDriver. this almost fixes the build problems of c-index-test
...
llvm-svn: 90342
2009-12-02 20:20:47 +00:00
Douglas Gregor
9485bf9538
Extend the CIndex code-completion API to perform code completion
...
involving unsaved files, using the -remap-file= functionality recently
added to clang-cc.
llvm-svn: 90314
2009-12-02 09:21:34 +00:00
Douglas Gregor
f09935f16c
Switch the clang-to-CIndex interface for code-completion to a binary format, for a massive speedup
...
llvm-svn: 90209
2009-12-01 05:55:20 +00:00
Daniel Dunbar
079203fa16
CIndex: Normalize formatting some more.
...
llvm-svn: 90196
2009-12-01 03:14:51 +00:00
Daniel Dunbar
5b2f5cadbd
Reindent buffer, switches in particular were totally out of style.
...
llvm-svn: 90155
2009-11-30 20:42:49 +00:00
Daniel Dunbar
bbc569ce8d
Strip trailing space.
...
llvm-svn: 90154
2009-11-30 20:42:43 +00:00
Daniel Dunbar
d80277895d
Change -code-completion-debug-printer to -no-code-completion-debug-printer.
...
Also, tweak a few help strings and update CompilerInvocation serialization for prev change.
llvm-svn: 89317
2009-11-19 05:32:09 +00:00
Ted Kremenek
e05d7806ff
Add clang_getNullCursor() and clang_equalCursors() (the latter for comparing cursors).
...
llvm-svn: 89131
2009-11-17 19:28:59 +00:00
Ted Kremenek
123344e5dd
Allow "source_filename" to be an optional argument (the client can provide 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
2009-11-17 18:18:02 +00:00
Ted Kremenek
98524b1ce2
Sort visitor methods. No functionality change.
...
llvm-svn: 89055
2009-11-17 07:02:15 +00:00
Ted Kremenek
4c4d643b6e
Have clang_getCursorSource() return NULL when the source location is invalid or refers to a built-in buffer. Implements <rdar://problem/7296243>.
...
llvm-svn: 89044
2009-11-17 05:31:58 +00:00
Daniel Dunbar
4a1f60f777
Move code completion options to clang-cc
...
llvm-svn: 87050
2009-11-13 01:02:10 +00:00
John Thompson
92ebab90fe
Fix clang executable path for Windows
...
llvm-svn: 86896
2009-11-11 23:11:14 +00:00
Ted Kremenek
ba64574c9a
CIndex: Only display diagnostics to llvm::errs() when the client has set the 'displayDiagnostics' option to 1 in clang_createIndex(). This fixes <rdar://problem/7370691>.
...
llvm-svn: 86700
2009-11-10 19:18:52 +00:00
Douglas Gregor
8caea94c74
Make sure that we look into nested, transparent declaration contexts
...
when looking for a name within a given DeclContext. Now enumerators
will show up in code-completion results.
llvm-svn: 86591
2009-11-09 21:35:27 +00:00
Benjamin Kramer
04c99a6fe8
Factor CXString creation into a helper method.
...
llvm-svn: 86577
2009-11-09 19:13:48 +00:00
Benjamin Kramer
d6f85a8c88
Writing to a struct passed by value is pointless. Remove dead code.
...
- 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
2009-11-09 18:24:53 +00:00
Steve Naroff
8675d5c754
Introduce CXString type and associated functions clang_getCString() and clang_disposeString().
...
This abstraction will help us manage string memory for complex names that cross the C++/C boundary (e.g. ObjC methods, selectors). This patch also uses it in clang_getTranslationUnitSpelling (which I'm not sure is necessary). Will investigate later...since the extra malloc() can't hurt (for now).
Patch by John Thompson.
llvm-svn: 86562
2009-11-09 17:45:52 +00:00
Douglas Gregor
8b14f8fde4
Minor cleanup for CIndex-based code-completion:
...
- Provide an actual test for code-completion via CIndex.
- Actually print optional strings in c-index-test
- Export clang_getCompletionChunkCompletionString from CIndex
llvm-svn: 86550
2009-11-09 16:04:45 +00:00
Daniel Dunbar
2679a884d7
Move a function which returns a class outside of extern C scope.
...
llvm-svn: 86439
2009-11-08 04:13:53 +00:00
Daniel Dunbar
a797946755
CIndex: Add temporary hack to leak memory instead of returning invalid pointers.
...
llvm-svn: 86438
2009-11-08 04:11:32 +00:00
Daniel Dunbar
5a3b974446
Add some missing libraries for CMake as well.
...
llvm-svn: 86390
2009-11-07 17:53:40 +00:00
Daniel Dunbar
05aaf77d6c
Add some missing libraries.
...
llvm-svn: 86389
2009-11-07 17:52:11 +00:00
Douglas Gregor
9eb7701dff
Various improvements to Clang's code-completion infrastructure:
...
- Introduce more code-completion string "chunk" kinds that describe
symbols, the actual text that the user is expected to type, etc.
- Make the generation of macro results optional, since it can be
slow
- Make code-completion accessible through the C API, marshalling the
code-completion results through a temporary file (ick) to maintain
process separation.
The last doesn't have tests yet.
llvm-svn: 86306
2009-11-07 00:00:49 +00:00
Daniel Dunbar
cb68cdfb03
Sort export list.
...
llvm-svn: 85832
2009-11-02 22:23:08 +00:00
Steve Naroff
f406f4d99b
- Add/tweak some comments.
...
- change ObjCCategoryImplDecl::getCategoryClass() to getCategoryDecl().
No functionality change.
llvm-svn: 85528
2009-10-29 21:11:04 +00:00
Steve Naroff
a4aeed6958
clang_getDeclSpelling(): For category implementations, make sure we hand back the category name (not the class name). This fixes <rdar://problem/7297518>.
...
llvm-svn: 85521
2009-10-29 18:55:50 +00:00
Steve Naroff
58bd62d190
Remove _clang_initCXLookupHint() and _clang_getCursorWithHint(). Related to <rdar://problem/7310688>.
...
Localize the optimization to ResolveLocationInAST(). The last valid AST location is now stored with ASTUnit. There still isn't optimal, however it's an improvement (with a much cleaner API). Having the client manage an "hint" is error prone and complex.
I wanted to land the major changes before finishing up the optimizations.
llvm-svn: 85425
2009-10-28 20:44:47 +00:00
Steve Naroff
6231f18793
Add support for 'CXFile' (<rdar://problem/7303360>).
...
- 4 new functions (clang_getCursorSourceFile, clang_getDeclSourceFile, clang_getFileName, clang_getFileTime).
- Should remove clang_getDeclSource() and clang_getCursorSource(). For now, just put 'deprecate' comment in header.
- Also changed CXX style comment to C style (to eliminate warning).
llvm-svn: 85238
2009-10-27 14:35:18 +00:00
John Thompson
de258b5ab9
Changes for building as a Windows DLL
...
llvm-svn: 85234
2009-10-27 13:42:56 +00:00
Ted Kremenek
12e678d550
Unify Unix and Windows code paths when executing 'clang'.
...
llvm-svn: 85163
2009-10-26 22:14:08 +00:00
Ted Kremenek
bf0690c99f
Remove unnecessary calls to 'flush()'.
...
llvm-svn: 85162
2009-10-26 22:08:39 +00:00
Ted Kremenek
2a3ffa9658
Always emit error diagnostics when an error occurs within clang_createTranslationUnit() and clang_createTranslationUnitFromSource(). These kind of errors are ones that shouldn't be missed.
...
llvm-svn: 84904
2009-10-22 22:19:00 +00:00
Ted Kremenek
a96b72a4ca
Split clang_getCursor() into clang_getCursor() and clang_getCursorWithHint().
...
llvm-svn: 84873
2009-10-22 17:22:53 +00:00
Ted Kremenek
44886fd124
Add some explanatory diagnostics when clang_createTranslationUnitFromSource fails.
...
llvm-svn: 84825
2009-10-22 03:24:01 +00:00
Ted Kremenek
649bf5c04b
Enhance 'clang_createTranslationUnitFromSourceFile()' in two ways:
...
(1) Allow the source file to be specified in the actual command line arguments by allowing the
caller to set 'source_filename' to NULL.
(2) Automatically strip off the arguments '-emit-ast', '-fsyntax-only', and '-c'.
llvm-svn: 84802
2009-10-22 00:03:57 +00:00
Steve Naroff
20bad0b7c6
Extend clang_getCursor() to take a 'relativeDecl' argument (so speed up searching). Without a 'relativeDecl', the algorithm is n-squared. For example, running the following command on 'Large.m' takes hours without a 'relatvieDecl'.
...
snaroff% time ../../Debug/bin/c-index-test Large.ast all > Large.out
snaroff% cat Large.m
#import <Cocoa/Cocoa.h>
#import <QuickTime/QuickTime.h>
#import <OpenGL/OpenGL.h>
With a 'relativeDecl', it takes <30 seconds:-)
llvm-svn: 84760
2009-10-21 13:56:23 +00:00
Steve Naroff
531e284064
- Extend clang_createIndex() to support PCH and diagnostic 'filtering'. This seems cleaner to me without sacrificing much flexibility.
...
- Remove clang_wantOnlyLocalDeclarations().
- Remove 'displayDiagnostics' arguments to clang_createTranslationUnitFromSourceFile() and clang_createTranslationUnit().
- Have clang_createTranslationUnitFromSourceFile() strip the '-o <outfile>' command line arguments if they exist. Document this semantic in the header. Also verify we have a valid ASTUnit before telling it to 'unlinkTemporaryFile()'.
llvm-svn: 84634
2009-10-20 14:46:24 +00:00
Ted Kremenek
e28968828b
Fix inverted preprocessor guard, and fix the resulting compiler error that was unmasked.
...
llvm-svn: 84555
2009-10-19 22:27:32 +00:00
Ted Kremenek
02b319ce18
Really fix <rdar://problem/7312058> by adding a 'displayDiagnostics' option to
...
clang_createTranslationUnit() and clang_createTranslationUnitFromSourceFile(). The user can now
specify if the diagnostics from Clang are printed to stderr or are silenced completely. We can
obviously evolve this API to be more general in the future.
Note: Added a FIXME since I wasn't certain what was the best way to redirect to something analogous
to '/dev/null' on Windows.
llvm-svn: 84548
2009-10-19 22:15:09 +00:00
Ted Kremenek
428c637ada
The constructor for ASTUnit now takes a DiagnosticClient*, allowing uses of ASTUnit to specify
...
alternate DiagnosticClients. To match this API, ASTUnit::LoadFromPCHFile() now takes a corresponding
DiagnosticClient* argument as well. The DiagnosticClient object is destroyed when the ASTUnit object
is destroyed.
The CIndex library now uses this API to create a 'IgnoreDiagnosticsClient' that simply silences
diagnostics when using the clang_createTranslationUnitFromSourceFile() function. This fixes
<rdar://problem/7312058>. This API can change in the future as we add more flexibility for clients.
llvm-svn: 84539
2009-10-19 21:44:57 +00:00
Ted Kremenek
9dd89ba393
Re-order includes so that the logic involving '#ifdef LLVM_ON_WIN32' appears after the main #includes. The ultimate solution is to just use LLVM-portable methods in llvm/System.
...
llvm-svn: 84534
2009-10-19 21:17:25 +00:00
Steve Naroff
505fb84ed9
Move Diagnostic/DiagClient/FileManager from Indexer => ASTUnit.
...
Removing this shared data should enable clang_createTranslationUnit/clang_createTranslationUnitFromSourceFile to be run from multiple threads (related to <rdar://problem/7303432>).
llvm-svn: 84499
2009-10-19 14:34:22 +00:00
Steve Naroff
2f78a6f368
Change indenting for case/compound statements to conform to the rest of clang.
...
llvm-svn: 84498
2009-10-19 13:41:39 +00:00
Benjamin Kramer
b625a13c79
CIndex: make variable non-static to avoid potential race conditions, per
...
Daniel's comment.
llvm-svn: 84484
2009-10-19 10:20:24 +00:00
Daniel Dunbar
2c422dc9ca
Move clients to use IdentifierInfo::getNameStart() instead of getName()
...
llvm-svn: 84436
2009-10-18 20:26:12 +00:00
Benjamin Kramer
a259086fd5
Try to unbreak MSVC build.
...
llvm-svn: 84433
2009-10-18 19:59:44 +00:00
Benjamin Kramer
ad9c37661b
CIndex: fix typo.
...
llvm-svn: 84422
2009-10-18 16:52:07 +00:00
Benjamin Kramer
49ce64eb88
Missed a paren.
...
llvm-svn: 84421
2009-10-18 16:20:58 +00:00
Benjamin Kramer
6bd6d50b42
CIndex: add a (untested) WIN32 codepath to get ClangPath.
...
llvm-svn: 84420
2009-10-18 16:13:48 +00:00
Benjamin Kramer
61f5d0cb15
CIndex: compute ClangPath lazily.
...
llvm-svn: 84419
2009-10-18 16:11:04 +00:00
Benjamin Kramer
2836c4ccb6
CIndex: replace fork/exec with our portable ExecuteAndWait wrapper.
...
llvm-svn: 84414
2009-10-18 11:19:36 +00:00
Benjamin Kramer
817e7e4fb8
CIndex: avoid a dangling pointer issue.
...
llvm-svn: 84413
2009-10-18 11:10:55 +00:00
Daniel Dunbar
cd23718ca1
Attempt to unbreak the MSVC build.
...
llvm-svn: 84381
2009-10-17 23:53:11 +00:00
Ted Kremenek
05729c2835
Resolve FIXME: delete the 'Program' object in the destructor of CIndexer.
...
llvm-svn: 84313
2009-10-17 06:21:47 +00:00
Ted Kremenek
8bcb1c6883
Add 'UseBumpPtrAllocator' flag to ASTUnit::LoadFromPCHFile() to cause the created ASTContext to use
...
its own BumpPtrAllocator to allocate ASTs.
Change clang_createTranslationUnit (CIndex) to pass 'UseBumpPtrAllocator = true' to
ASTUnit::LoadFromPCHFile().
llvm-svn: 84296
2009-10-17 00:34:24 +00:00
Douglas Gregor
d3d923a0f2
Make CIndex and c-index-test a little bit more robust. The only
...
substantive change is that clang_getCursorSource() now returns the
file in which a macro was instantiated when the cursor points into a
macro instantiation, rather than crashing.
llvm-svn: 84275
2009-10-16 21:24:31 +00:00
Douglas Gregor
16bef857d9
Keep track of whether declararions were loaded from a precompiled
...
header or not via a new "PCHLevel" field in Decl. We currently use
this information to help CIndex filter out declarations that came from
a precompiled header (rather than from an AST file). Further down the
road, it can be used to help implement multi-level precompiled
headers.
llvm-svn: 84267
2009-10-16 20:01:17 +00:00
Ted Kremenek
51d06bbe5b
Use an std::vector<> instead of an array of ARG_MAX size, as ARG_MAX may not be defined everywhere.
...
llvm-svn: 84220
2009-10-15 23:21:22 +00:00
Steve Naroff
44cd60eebe
Make sure temporary files get unlinked.
...
llvm-svn: 84208
2009-10-15 22:23:48 +00:00
Ted Kremenek
fb8e47323f
Add missing #include for wait().
...
llvm-svn: 84207
2009-10-15 22:10:56 +00:00
Steve Naroff
1cfb96cd14
Minor improvement to format...no functionality change.
...
llvm-svn: 84203
2009-10-15 20:50:09 +00:00
Steve Naroff
7781daa4e0
Implement <rdar://problem/7303432> [Clang/Index] In-memory-style AST generation API (initial API implementation).
...
Added clang_createTranslationUnitFromSourceFile().
Changed clang_createIndex() to lookup the location of clang (using dladdr).
llvm-svn: 84198
2009-10-15 20:04:39 +00:00
Douglas Gregor
629f4811a0
Make sure that libCIndex links as a C++ library
...
llvm-svn: 83331
2009-10-05 22:25:29 +00:00
Steve Naroff
d7eb7179a2
- Fix assert in clang_getCursorDecl (having to do with recently added ObjC_ProtocolRef).
...
- Make sure CHECK: lines in test case match the expected output.
llvm-svn: 83316
2009-10-05 17:58:19 +00:00
Steve Naroff
a6c56bb849
Add support for class and protocol references.
...
llvm-svn: 83186
2009-10-01 00:31:07 +00:00
Argyrios Kyrtzidis
419e38bbe2
When pointing at a type decl reference, ASTLocation is a NamedDeclRef.
...
llvm-svn: 83099
2009-09-29 19:45:58 +00:00
Argyrios Kyrtzidis
4cbe85904c
Modify ASTLocation and apart from being a Decl or Stmt, allow it to also be:
...
-A NamedDecl reference
-A TypeLoc
llvm-svn: 83095
2009-09-29 19:44:27 +00:00
Steve Naroff
43b118fc2c
Fix cut/paste error resulting in bad column info.
...
llvm-svn: 82810
2009-09-25 22:15:54 +00:00
Steve Naroff
2676089407
Add clang_getDeclSource().
...
llvm-svn: 82807
2009-09-25 21:45:39 +00:00
Steve Naroff
63f475a212
Add clang_getDeclLine and clang_getDeclColumn
...
Fix clang_getCursorDecl to do the right thing for expr refs
Fixup test file to accommodate new output (which includes the line/column for the referenced decl)
llvm-svn: 82798
2009-09-25 21:32:34 +00:00
Douglas Gregor
43bc1a7483
CMake build support for libCIndex and c-index-test. The indexing tests
...
are now running properly from within CMake.
llvm-svn: 82755
2009-09-25 06:35:15 +00:00
Steve Naroff
76b8f13fcb
More work to enable more exhaustive testing of the indexing API.
...
Next step: Add actual some test cases:-)
llvm-svn: 82636
2009-09-23 17:52:52 +00:00
Steve Naroff
66af1aecdb
- Implement support for various types of "refs" (initially to help test clang_getCursor()).
...
- Add missing prototypes for dispose functions.
llvm-svn: 82564
2009-09-22 19:25:29 +00:00
Daniel Dunbar
7cd285f0fe
Change ASTUnit to take the Diagnostic as an argument, the client should have control of this.
...
llvm-svn: 82430
2009-09-21 03:03:39 +00:00
Daniel Dunbar
948062a592
Add Diagnostic to Indexer, and have it keep its own FileManager instead of taking an external reference (which was leaked in the case of the CIndex library).
...
llvm-svn: 82429
2009-09-21 03:03:22 +00:00
Steve Naroff
3aa2d7300b
Add clang_disposeTranslationUnit() and clang_disposeIndex().
...
llvm-svn: 82154
2009-09-17 18:33:27 +00:00
Steve Naroff
54f22fb1de
- clang_getCursor(): Replace asserts with error codes (CXCursor_InvalidFile, CXCursor_NoDeclFound).
...
- Add predicate clang_isInvalid().
- Implement clang_getCursorFromDecl().
llvm-svn: 81908
2009-09-15 20:25:34 +00:00
Steve Naroff
ef9618b75f
Implement accessors clang_getCursorKind(), clang_getCursorDecl().
...
Implement clang_getCursor() - wired up to Argiris's work.
Implement callbacks for CXCursor_ObjCProtocolRef.
llvm-svn: 81004
2009-09-04 15:44:05 +00:00
Steve Naroff
c0683b909a
Add ASTUnit::getOriginalSourceFileName() and use in clang_getTranslationUnitSpelling().
...
llvm-svn: 80932
2009-09-03 18:19:54 +00:00
Steve Naroff
38c1a7ba12
- Add back some harmless code that part of a reverted commit (r80859). I'll investigate the lifetime snafu (with ASTUnit) separately.
...
- Traverse category methods, add a "class ref" and make the little test harness a bit more flexible.
llvm-svn: 80921
2009-09-03 15:49:00 +00:00
Daniel Dunbar
3a0637b06b
Revert "Visit function/method bodies and issue callback for parameters and local
...
variables.", this is breaking x86_64-apple-darwin10 and Linux tests.
llvm-svn: 80896
2009-09-03 05:59:50 +00:00
Steve Naroff
ef3cf2a576
Visit function/method bodies and issue callback for parameters and local variables.
...
Add clang_getTranslationUnitSpelling().
llvm-svn: 80859
2009-09-03 00:32:06 +00:00
Steve Naroff
b92c73a02a
Fix some newly added bugs uncovered by the RELEASE build.
...
llvm-svn: 80813
2009-09-02 18:58:52 +00:00
Steve Naroff
80a766bf50
Start issuing callback for references (add some predicates, refactor some code).
...
llvm-svn: 80810
2009-09-02 18:26:48 +00:00
Steve Naroff
3645f5a99b
Flesh out CXCursorKind...
...
- More declaration types (distinguish between struct/union/class, instance/class methods).
- Add definition types (class, category, function, instance/class method, etc.).
Add client data to clang_loadDeclaration() and implement.
llvm-svn: 80787
2009-09-02 13:28:54 +00:00
Steve Naroff
69b10fd2c5
Add explicit "blind" client data to callback function (since we aren't using blocks).
...
llvm-svn: 80673
2009-09-01 15:55:40 +00:00
Steve Naroff
772c1a4574
Implement source/line/column hooks.
...
llvm-svn: 80585
2009-08-31 14:26:51 +00:00
Steve Naroff
1054e60334
More fleshing out the C-based indexing API (under construction).
...
llvm-svn: 80529
2009-08-31 00:59:03 +00:00
Benjamin Kramer
8b83f5dfb8
gcc 4.4 needs cstdio for printf. Reorder includes while at it.
...
llvm-svn: 80430
2009-08-29 12:56:35 +00:00
Ted Kremenek
2dde6bb80e
Add CIndex dependencies: libLLVMC and libclangSema (for IdentifierResolver).
...
llvm-svn: 80385
2009-08-28 18:33:53 +00:00
Ted Kremenek
e486cdc015
Tweak CIndex file to resolve to linking issues with the clang libraries. In
...
particular, clangFrontend was not being linked in.
llvm-svn: 80384
2009-08-28 18:29:48 +00:00
Daniel Dunbar
e58bd8b1ab
Hide IdxVisitor and remove unimplemented method (causing link errors on x86_64
...
linux builder).
llvm-svn: 80376
2009-08-28 16:30:07 +00:00
Steve Naroff
a1c728438c
Lot's of little changes to get the C-based indexing API going...
...
Work in progress.
llvm-svn: 80367
2009-08-28 15:28:48 +00:00
Steve Naroff
8721959642
Add CX prefix to Cursor and move a comment.
...
llvm-svn: 80359
2009-08-28 12:07:44 +00:00
Ted Kremenek
30cbea5cad
Update exports list.
...
llvm-svn: 80306
2009-08-27 23:50:46 +00:00
Steve Naroff
d5e8e862bb
Fill in Index.h header file and add stubs to implementation file.
...
llvm-svn: 80279
2009-08-27 19:51:58 +00:00
Ted Kremenek
b60d87c517
Add initial boilerplate for CIndex, a shared library that will vend high-level
...
source symbol information (harvested by Clang) through a C API.
llvm-svn: 80166
2009-08-26 22:36:44 +00:00