| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
(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: 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
|
|
|
|
|
|
|
|
| |
ObjC_ProtocolRef).
- Make sure CHECK: lines in test case match the expected output.
llvm-svn: 83316
|
|
|
|
| |
llvm-svn: 83186
|
|
|
|
| |
llvm-svn: 83099
|
|
|
|
|
|
|
| |
-A NamedDecl reference
-A TypeLoc
llvm-svn: 83095
|
|
|
|
| |
llvm-svn: 82810
|
|
|
|
| |
llvm-svn: 82807
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Next step: Add actual some test cases:-)
llvm-svn: 82636
|
|
|
|
|
|
|
|
| |
clang_getCursor()).
- Add missing prototypes for dispose functions.
llvm-svn: 82564
|
|
|
|
|
|
| |
control of this.
llvm-svn: 82430
|
|
|
|
|
|
| |
taking an external reference (which was leaked in the case of the CIndex library).
llvm-svn: 82429
|
|
|
|
| |
llvm-svn: 82154
|
|
|
|
|
|
|
|
|
| |
CXCursor_NoDeclFound).
- Add predicate clang_isInvalid().
- Implement clang_getCursorFromDecl().
llvm-svn: 81908
|
|
|
|
|
|
|
| |
Implement clang_getCursor() - wired up to Argiris's work.
Implement callbacks for CXCursor_ObjCProtocolRef.
llvm-svn: 81004
|
|
|
|
|
|
| |
clang_getTranslationUnitSpelling().
llvm-svn: 80932
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
variables.", this is breaking x86_64-apple-darwin10 and Linux tests.
llvm-svn: 80896
|
|
|
|
|
|
|
|
| |
variables.
Add clang_getTranslationUnitSpelling().
llvm-svn: 80859
|
|
|
|
| |
llvm-svn: 80813
|
|
|
|
| |
llvm-svn: 80810
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
| |
blocks).
llvm-svn: 80673
|
|
|
|
| |
llvm-svn: 80585
|