summaryrefslogtreecommitdiffstats
path: root/clang/tools/CIndex/CXCursor.h
Commit message (Collapse)AuthorAgeFilesLines
* Rename 'CIndex' to 'libclang', since it has basically become our stable publicDaniel Dunbar2010-04-301-112/+0
| | | | | | (C) API, and will likely grow further in this direction in the future. llvm-svn: 102779
* Expose macro definitions as CIndex cursors. These can still only beDouglas Gregor2010-03-181-0/+8
| | | | | | generated by clang_annotateTokens(). llvm-svn: 98837
* Introduce the notion of a "preprocessing record", which keeps track ofDouglas Gregor2010-03-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | the macro definitions and macro instantiations that are found during preprocessing. Preprocessing records are *not* generated by default; rather, we provide a PPCallbacks subclass that hooks into the existing callback mechanism to record this activity. The only client of preprocessing records is CIndex, which keeps track of macro definitions and instantations so that they can be exposed via cursors. At present, only token annotation uses these facilities, and only for macro instantiations; both will change in the near future. However, with this change, token annotation properly annotates macro instantiations that do not produce any tokens and instantiations of macros that are later undef'd, improving our consistency. Preprocessing directives that are not macro definitions are still handled by clang_annotateTokens() via re-lexing, so that we don't have to track every preprocessing directive in the preprocessing record. Performance impact of preprocessing records is still TBD, although it is limited to CIndex and therefore out of the path of the main compiler. llvm-svn: 98836
* More token-annotation experimentation, preprocessing the annotatedDouglas Gregor2010-03-181-1/+8
| | | | | | | token sequence to detect macro instantiations (that produce at least token). WIP. llvm-svn: 98826
* Experimental stab at using relexing to identify preprocessorDouglas Gregor2010-03-181-0/+6
| | | | | | | | directives while annotating tokens in CIndex. This functionality should probably be factored out of this routine, but we're not there yet. llvm-svn: 98786
* Start adding cursor kinds for attributes, with first exposingTed Kremenek2010-02-181-2/+4
| | | | | | IBActionAttr and IBOutletAttr respectively. llvm-svn: 96563
* Fix include guard.Ted Kremenek2010-01-251-1/+1
| | | | llvm-svn: 94447
* Introduce type references into the C API, capturing references toDouglas Gregor2010-01-211-0/+8
| | | | | | typedefs only (for now). llvm-svn: 94078
* Stash a CXXUnit pointer into each cursor. This allows us to simplifyDouglas Gregor2010-01-201-5/+10
| | | | | | | the interface to clang_visitChildren() by eliminating the CXTranslationUnit pointer. llvm-svn: 94051
* Eliminate the MakeCXCursor routines that require their callers to know too ↵Douglas Gregor2010-01-201-3/+1
| | | | | | much about the cursor's storage llvm-svn: 94049
* Extend the CIndex API with direct support for expressions andDouglas Gregor2010-01-191-0/+1
| | | | | | | | | | 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
* Teach clang_getCursorLocation() to return the locations of referencesDouglas Gregor2010-01-181-2/+4
| | | | | | rather than the locations that refer to. llvm-svn: 93812
* Give ObjCClassRef cursors a sane representation, which is encapsulatedDouglas Gregor2010-01-161-1/+8
| | | | | | | | | 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
* Use a sane encoding for CXCursor_ObjCProtocolRef, using the actualDouglas Gregor2010-01-161-1/+10
| | | | | | | source locations where the protocols were referenced rather than the location of some random enclosing declaration. llvm-svn: 93637
* Give CXCursor_ObjCSuperClassRef a sane encoding, which is only knownDouglas Gregor2010-01-161-0/+12
| | | | | | to CXCursor.cpp. llvm-svn: 93634
* Migrate Decl* -> cursorkind logic into CXCursor.cpp, and drastically tighten ↵Ted Kremenek2010-01-161-0/+1
| | | | | | TUVisitor. llvm-svn: 93599
* Make CXCursor's data opaque.Douglas Gregor2010-01-151-0/+14
| | | | llvm-svn: 93561
* Add CXCursor.[h,cpp]. These files will centralize the logic for ↵Ted Kremenek2010-01-151-0/+31
creating/probing CXCursors. llvm-svn: 93547
OpenPOWER on IntegriCloud