| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
llvm-svn: 86439
|
|
|
|
| |
llvm-svn: 86438
|
|
|
|
| |
llvm-svn: 86390
|
|
|
|
| |
llvm-svn: 86389
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
llvm-svn: 85832
|
|
|
|
|
|
|
|
| |
- change ObjCCategoryImplDecl::getCategoryClass() to getCategoryDecl().
No functionality change.
llvm-svn: 85528
|
|
|
|
|
|
| |
back the category name (not the class name). This fixes <rdar://problem/7297518>.
llvm-svn: 85521
|
|
|
|
|
|
|
|
|
|
| |
<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
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
llvm-svn: 85234
|
|
|
|
| |
llvm-svn: 85163
|
|
|
|
| |
llvm-svn: 85162
|
|
|
|
|
|
| |
clang_createTranslationUnit() and clang_createTranslationUnitFromSource(). These kind of errors are ones that shouldn't be missed.
llvm-svn: 84904
|
|
|
|
| |
llvm-svn: 84873
|
|
|
|
|
|
| |
fails.
llvm-svn: 84825
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
was unmasked.
llvm-svn: 84555
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
after the main #includes. The ultimate solution is to just use LLVM-portable methods in llvm/System.
llvm-svn: 84534
|
|
|
|
|
|
| |
Removing this shared data should enable clang_createTranslationUnit/clang_createTranslationUnitFromSourceFile to be run from multiple threads (related to <rdar://problem/7303432>).
llvm-svn: 84499
|
|
|
|
| |
llvm-svn: 84498
|
|
|
|
|
|
| |
Daniel's comment.
llvm-svn: 84484
|
|
|
|
| |
llvm-svn: 84436
|
|
|
|
| |
llvm-svn: 84433
|
|
|
|
| |
llvm-svn: 84422
|
|
|
|
| |
llvm-svn: 84421
|
|
|
|
| |
llvm-svn: 84420
|
|
|
|
| |
llvm-svn: 84419
|
|
|
|
| |
llvm-svn: 84414
|
|
|
|
| |
llvm-svn: 84413
|
|
|
|
| |
llvm-svn: 84381
|
|
|
|
| |
llvm-svn: 84313
|
|
|
|
|
|
|
|
|
|
|
| |
created ASTContext to use
its own BumpPtrAllocator to allocate ASTs.
Change clang_createTranslationUnit (CIndex) to pass 'UseBumpPtrAllocator = true' to
ASTUnit::LoadFromPCHFile().
llvm-svn: 84296
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
be defined everywhere.
llvm-svn: 84220
|
|
|
|
| |
llvm-svn: 84208
|
|
|
|
| |
llvm-svn: 84207
|
|
|
|
| |
llvm-svn: 84203
|
|
|
|
|
|
|
|
|
| |
generation API (initial API implementation).
Added clang_createTranslationUnitFromSourceFile().
Changed clang_createIndex() to lookup the location of clang (using dladdr).
llvm-svn: 84198
|
|
|
|
| |
llvm-svn: 83331
|
|
|
|
|
|
|
|
| |
ObjC_ProtocolRef).
- Make sure CHECK: lines in test case match the expected output.
llvm-svn: 83316
|
|
|
|
| |
llvm-svn: 83186
|
|
|
|
| |
llvm-svn: 83099
|