summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/get-cursor.m
Commit message (Collapse)AuthorAgeFilesLines
* [libclang] Introduce clang_Cursor_isExternalSymbol that provides info about ↵Argyrios Kyrtzidis2017-05-101-0/+11
| | | | | | decls marked with external_source_symbol attribute llvm-svn: 302677
* [index/AST] Determine if a typedef shares a name and spelling location with ↵Argyrios Kyrtzidis2017-03-211-0/+33
| | | | | | | | | | its underlying tag type In such a case, as when using the NS_ENUM macro, for indexing purposes treat the typedef as 'transparent', meaning we treat its references as symbols of the underlying tag symbol. Also provide a libclang API to check for such typedefs. llvm-svn: 298392
* [libclang] For convenience to clients, make sure that nullability and ↵Argyrios Kyrtzidis2015-08-241-0/+23
| | | | | | | | | | __kindof annotations do not hide the underlying type. rdar://22063577 llvm-svn: 245867
* [libclang] Introduce clang_Cursor_isObjCOptional, which returns whether the ↵Argyrios Kyrtzidis2013-07-051-0/+24
| | | | | | | | declaration was affected by "@optional" rdar://14348525. llvm-svn: 185722
* [libclang] When determining the cursor via a location, ignore synthesized ↵Argyrios Kyrtzidis2012-08-281-1/+12
| | | | | | | | | | | | | | | | ivars otherwise if we have something like: @synthesize prop = _prop; and '_prop' is not declared, we will encounter a '_prop' ivar before encountering the 'prop' synthesize declaration and we will think that we passed the region-of-interest, missing the cursor for 'prop'. rdar://12172700 llvm-svn: 162715
* [AST/libclang] Fix the selector locations that are reported for aArgyrios Kyrtzidis2012-06-161-0/+11
| | | | | | | | | | | | | | | | | | | | | | method definition that has its '{' attached to the method name without a space. With a method like: -(id)meth{ ..... } the logic in ObjCMethodDecl that determined the selector locations got confused because it was initialized based on an end location for '{' but that end location changed to '}' after the method was finished. Fix this by having an immutable end location for the declarator and for getLocEnd() get the end location from the body itself. Fixes rdar://11659739. llvm-svn: 158583
* [libclang] When doing the cursor visitation make sure declarationsArgyrios Kyrtzidis2012-06-091-0/+22
| | | | | | | | | | | | | | | in the same line do not override getting a cursor for the previous declaration. e.g: int x, y; @synthesize prop1, prop2; pointing at 'x'/'prop1' would give 'y'/'prop2' because their source ranges overlap. rdar://11361113 llvm-svn: 158258
* [libclang] Make sure that when we have multiple @class references in the ↵Argyrios Kyrtzidis2012-04-161-0/+7
| | | | | | | | | | | | | | | same line, that later ones do not override the previous ones. If we have: @class Foo, Bar; source ranges for both start at '@', so 'Bar' will end up overriding 'Foo' even though the cursor location was at 'Foo'. rdar://11257578 llvm-svn: 154873
* [libclang] Spelling range for a objc category should the category name ↵Argyrios Kyrtzidis2012-04-161-0/+10
| | | | | | | | range, not the class one. rdar://11249386 llvm-svn: 154853
* [libclang] Introduce clang_Cursor_getObjCSelectorIndex() function.Argyrios Kyrtzidis2012-03-301-2/+2
| | | | | | | | | | After getting a cursor with clang_getCursor for a particular source location, allows querying the cursor in order to find out if the location points to a selector identifier in an objc method or message expression, and which selector index it is. rdar://11158946 llvm-svn: 153781
* [libclang] Introduce clang_Cursor_getSpellingNameRange().Argyrios Kyrtzidis2012-03-301-4/+17
| | | | | | | | | | | It retrieves a source range for a piece that forms the cursors spelling name. Most of the times there is only one range for the complete spelling but for objc methods and objc message expressions, there are multiple pieces for each selector identifier. Part of rdar://11113120 llvm-svn: 153775
* Add info to ObjCPropertyRefExpr to indicate whether the dot syntax propertyArgyrios Kyrtzidis2012-03-301-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | reference is going to message the setter, the getter, or both. Having this info on the ObjCPropertyRefExpr node makes it easier for AST clients (like libclang) to reason about the meaning of the property reference. [AST/Sema] -Use 2 bits (with a PointerIntPair) in ObjCPropertyRefExpr to record the above info -Have ObjCPropertyOpBuilder set the info appropriately. [libclang] -When there is an implicit property reference (property syntax using methods) have clang_getCursorReferenced return a cursor for the method. If the property reference is going to result in messaging both the getter and the setter choose to return a cursor for the setter because it is less obvious from source inspection that the setter is getting called. The general idea has the seal of approval by John. rdar://11151621 llvm-svn: 153709
* [libclang] A MemberRefExpr cursor for a property dot syntax should have asArgyrios Kyrtzidis2012-03-301-0/+3
| | | | | | | | its location the location of the property. Part of rdar://11113120 llvm-svn: 153708
* [libclang] Have c-index-test output more information about a cursor with ↵Argyrios Kyrtzidis2012-03-301-2/+6
| | | | | | | | | | | | -cursor-at: -the location of the cursor -its extent -its spelling Part of radar://11113120 llvm-svn: 153707
* [libclang] For a ↵Argyrios Kyrtzidis2012-03-231-1/+1
| | | | | | | | | | CXCursor_ObjCInstanceMethodDecl/CXCursor_ObjCClassMethodDecl cursor, return from clang_getCursorLocation the start location of the method name. rdar://11105223 llvm-svn: 153303
* [libclang] Make sure that all top-level decls in a @implementation areArgyrios Kyrtzidis2012-02-231-0/+15
| | | | | | | | marked as such. Previously we missed tag declarations; fixes rdar://10902015 llvm-svn: 151283
* rename -ccc-host-triple into -targetSebastian Pop2012-01-201-1/+1
| | | | llvm-svn: 148582
* Revert r148138; it's causing test failures.Eli Friedman2012-01-131-1/+1
| | | | llvm-svn: 148141
* rename -ccc-host-triple into -targetSebastian Pop2012-01-131-1/+1
| | | | llvm-svn: 148138
* Mark objc methods that are implicitly declared for properties (not ↵Argyrios Kyrtzidis2011-08-171-4/+20
| | | | | | | | user-declared) as implicit. This results in libclang ignoring such methods. llvm-svn: 137852
* Fix tests for non-darwin hosts.Argyrios Kyrtzidis2011-08-151-1/+1
| | | | llvm-svn: 137688
* [libclang] Handle AttributedTypeLoc for cursor visitation. Fixes rdar://9535717.Argyrios Kyrtzidis2011-08-151-0/+10
| | | | llvm-svn: 137634
* [libclang] When pointing at an objc property don't return a cursor that ↵Argyrios Kyrtzidis2011-08-101-0/+11
points at the synthesized method for the property. rdar://9771715 llvm-svn: 137248
OpenPOWER on IntegriCloud