summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/TestClassDecl.m
Commit message (Collapse)AuthorAgeFilesLines
* Fix FileCheck --check-prefix lines.Tim Northover2013-08-121-2/+2
| | | | | | | | | | Various tests had sprung up over the years which had --check-prefix=ABC on the RUN line, but "CHECK-ABC:" later on. This happened to work before, but was strictly incorrect. FileCheck is getting stricter soon though. Patch by Ron Ofir. llvm-svn: 188174
* [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. llvm-svn: 148861
* 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. llvm-svn: 147299
* Keep track of all declarations of an Objective-C class (both forwardDouglas Gregor2011-12-151-1/+1
| | | | | | | | | | declarations and definitions) as ObjCInterfaceDecls within the same redeclaration chain. This new representation matches what we do for C/C++ variables/functions/classes/templates/etc., and makes it possible to answer the query "where are all of the declarations of this class?" llvm-svn: 146679
* Expose more statement, expression, and declaration kinds in libclang,Douglas Gregor2011-10-051-1/+1
| | | | | | from Manuel Holtgrewe! llvm-svn: 141200
* Fixed source range for all DeclaratorDecl's.Abramo Bagnara2011-03-081-1/+1
| | | | llvm-svn: 127225
* 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. llvm-svn: 119514
* 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. llvm-svn: 113805
* Implement clang_saveTranslationUnit(), which saves a translation unitDouglas Gregor2010-08-131-1/+1
| | | | | | into a PCH/AST file. llvm-svn: 111006
* Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,Douglas Gregor2010-08-111-1/+1
| | | | | | | | and create separate decl nodes for forward declarations and the definition," which appears to be causing significant Objective-C breakage. llvm-svn: 110803
* - Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for ↵Sebastian Redl2010-08-091-1/+1
| | | | | | | | | | forward declarations and the definition. - Eagerly create ObjCInterfaceTypes for declarations. - The two above changes lead to a 0.5% increase in memory use and no speed regression when parsing Cocoa.h. On the other hand, now chained PCH works when there's a forward declaration in one PCH and the interface definition in another. - Add HandleInterestingDecl to ASTConsumer. PCHReader passes the "interesting" decls it finds to this function instead of HandleTopLevelDecl. The default implementation forwards to HandleTopLevelDecl, but ASTUnit's handler for example ignores them. This fixes a potential crash when lazy loading of PCH data would cause ASTUnit's "top level" declaration collection to change while being iterated. llvm-svn: 110610
* c-index-test: Unify and always print half-open extents.Daniel Dunbar2010-02-141-14/+14
| | | | llvm-svn: 96160
* c-index-test: Unify syntax for printing extents. Yes, there were 4.Daniel Dunbar2010-02-141-14/+14
| | | | llvm-svn: 96158
* 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. llvm-svn: 94426
* Teach CIndex's cursor visitor to restrict its traversal to a specificDouglas Gregor2010-01-221-12/+7
| | | | | | | | | | | | | | 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
* 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). llvm-svn: 93946
* 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. llvm-svn: 93924
* Eliminate cursor kinds used to express definitions. Instead, provideDouglas Gregor2010-01-191-7/+7
| | | | | | | | | | | | 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
* Introduce clang_getCursorReferenced, to get a cursor pointing at theDouglas Gregor2010-01-191-1/+1
| | | | | | entity that a particular cursor references. llvm-svn: 93830
* Replace clang_getDeclUSR() with clang_getCursorUSR(). Also remove printing ↵Ted Kremenek2010-01-181-3/+3
| | | | | | 'contexts' from c-index-test output; it wasn't helpful and was extremely brittle. llvm-svn: 93760
* Give ObjCClassRef cursors a sane representation, which is encapsulatedDouglas Gregor2010-01-161-2/+2
| | | | | | | | | 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
* 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. llvm-svn: 93618
* Change ObjCContainerDecl to contain the entire range for the '@end'Ted Kremenek2010-01-071-20/+6
| | | | | | | | | | | piece of the declaration. The '@' and the 'end' are separate tokens, and require two SourceLocations to accurately track. This change was motivated because ObjCContainerDecl::getSourceRange() would previously not return the entire range of the declaration (the 'end' would be left off). llvm-svn: 92891
* 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). llvm-svn: 91446
* Make tests use the new clang -cc1 flag.Fariborz Jahanian2009-12-141-1/+1
| | | | llvm-svn: 91303
* Update test to stop scanning things in the predefines buffer, this isn't addingDaniel Dunbar2009-11-181-14/+14
| | | | | | value. llvm-svn: 89235
* Update index tests for r89203.Benjamin Kramer2009-11-181-7/+7
| | | | llvm-svn: 89204
* Add special clang_getCursor() support for @class. Handles ↵Ted Kremenek2009-11-181-0/+52
<rdar://problem/7383421>. llvm-svn: 89183
OpenPOWER on IntegriCloud