summaryrefslogtreecommitdiffstats
path: root/test/Index/TestClassForwardDecl.m
Commit message (Collapse)AuthorAgeFilesLines
* [libclang] In clang::getCursorKindForDecl() don't return "UnexposedDecl"Argyrios Kyrtzidis2012-01-241-1/+1
| | | | | | | | for forward references of classes and protocols, this breaks libclang API usage. rdar://10747438. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148861 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDeclDouglas Gregor2011-12-271-1/+1
| | | | | | | | covers both declarations (@class) and definitions (@interface) of an Objective-C class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147299 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose more statement, expression, and declaration kinds in libclang,Douglas Gregor2011-10-051-1/+1
| | | | | | | from Manuel Holtgrewe! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141200 91177308-0d34-0410-b5e6-96231b3b80d8
* Make -fobjc-nonfragile-abi the -cc1 default, since it's theJohn McCall2011-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | increasingly prevailing case to the point that new features like ARC don't even support the fragile ABI anymore. This required a little bit of reshuffling with exceptions because a check was assuming that ObjCNonFragileABI was only being set in ObjC mode, and that's actually a bit obnoxious to do. Most, though, it involved a perl script to translate a ton of test cases. Mostly no functionality change for driver users, although there are corner cases with disabling language-specific exceptions that we should handle more correctly now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140957 91177308-0d34-0410-b5e6-96231b3b80d8
* When comparing the source range of a declaration against the region ofDouglas Gregor2010-11-171-2/+2
| | | | | | | | | | | interest (e.g., as used by clang_getCursor()), count the decl-specifier-seq as part of the source range, as we do for clang_annotateTokens(). Makes clang_getCursor() work properly for the result types of functions, for example. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119514 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a new kind of cursor into libclang, which covers a referenceDouglas Gregor2010-09-131-1/+1
| | | | | | | | | | to an "overloaded" set of declarations. This cursor kind works for unresolved references to functions/templates (e.g., a call within a template), using declarations, and Objective-C class and protocol forward declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113805 91177308-0d34-0410-b5e6-96231b3b80d8
* c-index-test: Unify and always print half-open extents.Daniel Dunbar2010-02-141-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96160 91177308-0d34-0410-b5e6-96231b3b80d8
* c-index-test: Unify syntax for printing extents. Yes, there were 4.Daniel Dunbar2010-02-141-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96158 91177308-0d34-0410-b5e6-96231b3b80d8
* Loosen preconditions for clang_getCursorSpelling(), returning an emptyDouglas Gregor2010-01-251-1/+1
| | | | | | | | | string when given a cursor that does not have a name. Also, don't give silly names for statements and non-reference expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94426 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach CIndex's cursor visitor to restrict its traversal to a specificDouglas Gregor2010-01-221-8/+3
| | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94200 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend the CIndex API with direct support for expressions andDouglas Gregor2010-01-191-1/+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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93946 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce the notion of an "unexposed" declaration into the CIndexDouglas Gregor2010-01-191-1/+1
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93924 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate cursor kinds used to express definitions. Instead, provideDouglas Gregor2010-01-191-6/+6
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93893 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce clang_getCursorReferenced, to get a cursor pointing at theDouglas Gregor2010-01-191-2/+2
| | | | | | | entity that a particular cursor references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93830 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace clang_getDeclUSR() with clang_getCursorUSR(). Also remove printing ↵Ted Kremenek2010-01-181-2/+2
| | | | | | 'contexts' from c-index-test output; it wasn't helpful and was extremely brittle. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93760 91177308-0d34-0410-b5e6-96231b3b80d8
* Give ObjCClassRef cursors a sane representation, which is encapsulatedDouglas Gregor2010-01-161-1/+1
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93640 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove TranslateKind and centralize Decl -> CXCursorKind in GetCursorKind(). ↵Ted Kremenek2010-01-161-6/+6
| | | | | | This revealed a bunch of inconsistencies in how CXCursorKinds were being computed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93618 91177308-0d34-0410-b5e6-96231b3b80d8
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
* Make tests use the new clang -cc1 flag.Fariborz Jahanian2009-12-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91303 91177308-0d34-0410-b5e6-96231b3b80d8
* Update test to stop scanning things in the predefines buffer, this isn't addingDaniel Dunbar2009-11-181-14/+14
| | | | | | value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89235 91177308-0d34-0410-b5e6-96231b3b80d8
* Update index tests for r89203.Benjamin Kramer2009-11-181-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89204 91177308-0d34-0410-b5e6-96231b3b80d8
* Add special clang_getCursor() support for @class. Handles ↵Ted Kremenek2009-11-181-0/+46
<rdar://problem/7383421>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89183 91177308-0d34-0410-b5e6-96231b3b80d8