| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
weren't actually using any of its facilities.
llvm-svn: 94210
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
region of interest (if provided). Implement clang_getCursor() in terms
of this traversal rather than using the Index library; the unified
cursor visitor is more complete, and will be The Way Forward.
Minor other tweaks needed to make this work:
- Extend Preprocessor::getLocForEndOfToken() to accept an offset
from the end, making it easy to move to the last character in the
token (rather than just past the end of the token).
- In Lexer::MeasureTokenLength(), the length of whitespace is zero.
llvm-svn: 94200
|
|
|
|
| |
llvm-svn: 94126
|
|
|
|
|
|
|
|
| |
declarations that have enough source information to make such a walk
useful. This includes walking into variable initializers and enum
constants, the types behind typedefs, etc.
llvm-svn: 94124
|
|
|
|
|
|
| |
a few important subkinds. Now we're cookin' with gas!
llvm-svn: 94116
|
|
|
|
|
|
|
| |
is hard to test now; tests will come when we can walk stataements and
expressions properly.
llvm-svn: 94099
|
|
|
|
|
|
| |
kinds, so that we see referenced types, protocols, classes, etc.
llvm-svn: 94085
|
|
|
|
|
|
| |
typedefs only (for now).
llvm-svn: 94078
|
|
|
|
|
|
|
| |
the interface to clang_visitChildren() by eliminating the
CXTranslationUnit pointer.
llvm-svn: 94051
|
|
|
|
|
|
| |
much about the cursor's storage
llvm-svn: 94049
|
|
|
|
|
|
| |
CXCursor-based APIs.
llvm-svn: 94037
|
|
|
|
| |
llvm-svn: 94034
|
|
|
|
|
|
|
| |
cursor-based traversal, and eliminate TUVisitor. We're now down to one
visitor for traversing the AST. Yay!
llvm-svn: 94025
|
|
|
|
|
|
|
|
|
|
|
|
| |
children of a given cursor, regardless of what kind of cursor it
is. This is a generalization of clang_loadDeclaration and
clang_loadTranslationUnit that will also extent to statements,
expressions, etc.
As proof-of-concept, switched clang_loadDeclaration() from its own
visitor over to an instance of this traversal function internally.
llvm-svn: 94022
|
|
|
|
| |
llvm-svn: 93957
|
|
|
|
|
|
|
| |
clang_getDeclSource, and clang_getDeclSourceFile; the cursor
equivalents are the way of the future.
llvm-svn: 93955
|
|
|
|
|
|
|
|
|
| |
the root of the conceptual cursor hierarchy (just like we do with
declarations). This will be used when we get to unify
clang_loadTranslationUnit() and clang_loadDeclaration() into something
more generally useful.
llvm-svn: 93954
|
|
|
|
|
|
|
| |
and CXCursor_EnumConstantRef; they've been subsumed by expression
references, which do a much nicer job.
llvm-svn: 93947
|
|
|
|
|
|
|
|
|
|
| |
statements, moving some of the more unnatural kinds of references
(VarRef, EnumConstantRef, etc.) over to the expressions. We can now
poke at arbitrary expressions and statements with, e.g.,
clang_getCursor() and get back useful information (e.g., source
ranges).
llvm-svn: 93946
|
|
|
|
|
|
| |
now-dead CXCursor_ObjCIvarRef.
llvm-svn: 93928
|
|
|
|
|
|
| |
have been marked for death for a while.
llvm-svn: 93927
|
|
|
|
|
|
|
|
| |
API. This is a catch-all for any declaration known to Clang but not
specifically part of the CIndex API. We'll use the same approach with
expressions, statements, references, etc., as needed.
llvm-svn: 93924
|
|
|
|
|
|
|
|
|
|
| |
opaque data structures accessed through the new functions
clang_getInstantiationLocation(), clang_getRangeStart(), and
clang_getRangeEnd(). The new API permits later extensions to introduce
new functions to allow CIndex clients to walk macro instantiations, if
we ever care.
llvm-svn: 93915
|
|
|
|
|
|
|
|
|
|
|
|
| |
CIndex functions that (1) map from a reference or declaration to the
corresponding definition, if available, and (2) determine whether a
given declaration cursor is also a definition. This eliminates a lot
of duplication in the cursor kinds, and maps more closely to the Clang
ASTs.
This is another API + ABI breaker with no deprecation. Yay, progress.
llvm-svn: 93893
|
|
|
|
|
|
| |
entity that a particular cursor references.
llvm-svn: 93830
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cursor itself. In particular, for references this returns the source
range of the reference rather than the source range of the thing it
refers to.
Switch c-index-test from clang_getDeclExtent (which will eventually be
deprecated and removed) over to clang_getCursorExtent. The source
ranges we print for references now make sense; fix up the tests
appropriately.
llvm-svn: 93823
|
|
|
|
|
|
| |
rather than the locations that refer to.
llvm-svn: 93812
|
|
|
|
|
|
|
| |
clang_getCursorLine(), clang_getCursorColumn(),
clang_getCursorSource(), and clang_getCursorSourceFile() outright.
llvm-svn: 93801
|
|
|
|
|
|
|
|
| |
clang_getCursorLine(), clang_getCursorColumn(),
clang_getCursorSource(), and clang_getCursorSourceFile(). Mark those 4
functions as deprecated and stop using them ourselves.
llvm-svn: 93800
|
|
|
|
|
|
|
|
|
|
|
| |
Renamed CXSourceFileLine to CXSourceLocation and added a CXFile, to
better match Clang's SourceLocation. Teach clang_getDeclExtent to fill
in the CXFile properly.
Renamed CXSourceExtent to CXSourceRange, to better match Clang's
SourceLocation.
llvm-svn: 93783
|
|
|
|
| |
llvm-svn: 93731
|
|
|
|
|
|
|
|
|
| |
in CXCursor.cpp. With this sane representation, fix the class
reference that is part of Objective-C category declarations so that
the cursor's location matches up with the reference, not the class
being referred to.
llvm-svn: 93640
|
|
|
|
|
|
|
| |
source locations where the protocols were referenced rather than the
location of some random enclosing declaration.
llvm-svn: 93637
|
|
|
|
|
|
| |
to CXCursor.cpp.
llvm-svn: 93634
|
|
|
|
|
|
| |
This identified a missing case (warned by the compiler) and identified that CXCursor_FirstDecl didn't actually correspond to the first decl.
llvm-svn: 93622
|
|
|
|
|
|
| |
This revealed a bunch of inconsistencies in how CXCursorKinds were being computed.
llvm-svn: 93618
|
|
|
|
|
|
| |
TUVisitor.
llvm-svn: 93599
|
|
|
|
| |
llvm-svn: 93586
|
|
|
|
| |
llvm-svn: 93561
|
|
|
|
|
|
| |
creating/probing CXCursors.
llvm-svn: 93547
|
|
|
|
|
|
| |
using the referringDecl for the location.
llvm-svn: 93520
|
|
|
|
| |
llvm-svn: 93405
|
|
|
|
|
|
| |
function 'MakeCXCursor' to centralize the logic for creating CXCursor objects.
llvm-svn: 93359
|
|
|
|
|
|
| |
declaration references from other delcarations.
llvm-svn: 93343
|
|
|
|
| |
llvm-svn: 93328
|
|
|
|
| |
llvm-svn: 93276
|
|
|
|
|
|
|
|
| |
what visitor methods are defined.
Generalize TUVisitor to take a general "root" and "iterator" callback; this is prep. work to merging TUVisitor and CDeclVisitor.
llvm-svn: 93275
|
|
|
|
| |
llvm-svn: 93225
|
|
|
|
| |
llvm-svn: 93212
|
|
|
|
|
|
|
|
|
| |
- 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
|