summaryrefslogtreecommitdiffstats
path: root/clang/Sema
Commit message (Collapse)AuthorAgeFilesLines
...
* simplify the interface to create ObjcClassDecl's.Chris Lattner2007-10-061-8/+8
| | | | llvm-svn: 42706
* simplify the interface for creating ObjcForwardProtocolDeclChris Lattner2007-10-061-7/+7
| | | | llvm-svn: 42705
* This is the first patch toward supporting protocol conformingFariborz Jahanian2007-10-052-2/+31
| | | | | | | objective-c types. It also removes use of Scope* parameter in getObjCProtocolDecl. llvm-svn: 42649
* Implement DenseMapInfo for Selector, allowing use of DenseMap/DenseSet ofChris Lattner2007-10-052-15/+14
| | | | | | | | Selector's instead of requiring void* to be used. I converted one use of DenseSet<void*> over to use DenseSet<Selector> but the others should change as well. llvm-svn: 42645
* Patch for 1) Checking for duplicate methods decls in intterface and category.Fariborz Jahanian2007-10-052-27/+90
| | | | | | 2) Use of the new DenseSet<t> abstractions instead of DenseMap<t,char>. llvm-svn: 42641
* this patch accomodates clattner's comments on expression processing in ↵Fariborz Jahanian2007-10-041-16/+17
| | | | | | @try-statement. llvm-svn: 42611
* Fixed tabs in couple of sources.Fariborz Jahanian2007-10-041-21/+21
| | | | llvm-svn: 42601
* Fixed all my recent test cases to have the RUN command andFariborz Jahanian2007-10-041-6/+7
| | | | | | fixed consequence of these changes in clang. llvm-svn: 42600
* Finish renaming ObjC declaration actions.Steve Naroff2007-10-032-16/+16
| | | | | | | | | | | | Add comments. Switch to new indentation style for the Action class. Since many actions take many arguments, the new style will... - make it easier to add/remove arguments without messing up the indentation... - make it easier to add comments to each argument (see ActOnMethodDeclaration for an example)... - in general, just makes it easier to see what is being passed. The rest of Actions will be converted "lazily"...there is no immediate need to hack all the existing methods. llvm-svn: 42587
* Renamed getCatLoc() to getLocation() to be consistant for suchFariborz Jahanian2007-10-031-1/+1
| | | | | | getter names. llvm-svn: 42577
* Rename several ObjC action methods to use the "ActOn" prefix (still a few ↵Steve Naroff2007-10-022-15/+16
| | | | | | | | | more to do). Remove Action::ObjCStartCategoryInterface/ObjCFinishInterface - they are unused. . llvm-svn: 42559
* Unified such names as protocol references, instance methods and class methodsFariborz Jahanian2007-10-021-23/+23
| | | | | | and their accessors in a variety of objective-c classes. llvm-svn: 42555
* Remove Action::ActOnImpleIvarVsClassIvars(), it is only called by Sema (not ↵Steve Naroff2007-10-022-16/+17
| | | | | | | | Parser). Add Sema::CheckImplementationIvars() to replace the previous action. llvm-svn: 42553
* Rename ObjcInterfaceDecl::getIsForwardDecl() to isForwardDecl().Steve Naroff2007-10-021-11/+11
| | | | | | | | | | | | | Rename ObjcProtocolDecl::getIsForwardProtoDecl() to isForwardDecl(). Rename ObjcInterfaceDecl::setIsForwardDecl() to setForwardDecl(). Rename ObjcProtocolDecl::setIsForwardProtoDecl() to setForwardDecl(). Two reasons: #1: boolean predicates should start with "is". #2: Since these two sets of methods represent the same concept, they should be named the same (polymorphism is good:-) llvm-svn: 42545
* Previously, I warned those methods not implemented in implementation ↵Fariborz Jahanian2007-10-022-5/+20
| | | | | | | | class/category. Now, I also warn those class/categories which are incomplete because of this. llvm-svn: 42544
* - Add ObjcInterfaceDecl::lookupInstanceMethod(), lookupClassMethod().Steve Naroff2007-10-023-25/+46
| | | | | | | | - Add ObjcMessageExpr::getSelector(), getClassName(). - Change Sema::getObjCInterfaceDecl() to simply take an IdentifierInfo (no Scope needed). - Remove FIXME for printing ObjCMessageExpr's. llvm-svn: 42543
* ObjcCategoryDecl Does not subclass from ScopedDecl any more.Fariborz Jahanian2007-10-021-1/+1
| | | | | | | Ted may want to take a look at the change I made at FGRecStmtDeclVisitor.h. llvm-svn: 42535
* This patch introduces the ObjcCategoryImplDecl class and does the checking ↵Fariborz Jahanian2007-10-022-1/+96
| | | | | | | | related to unimplemented methods in category implementation. llvm-svn: 42531
* Move ObjC decls to DeclObjC.h, a new AST header.Steve Naroff2007-10-012-0/+2
| | | | | | Update clients and add to project file. llvm-svn: 42494
* Took care of clatter's suggestions, dated.Fariborz Jahanian2007-10-011-19/+11
| | | | | | | September 30, 2007 12:36:58 AM PDT and September 30, 2007 12:50:05 AM PDT llvm-svn: 42490
* Fix a bug I just introduced.Chris Lattner2007-09-301-3/+3
| | | | llvm-svn: 42479
* simplify an expressionChris Lattner2007-09-301-2/+1
| | | | llvm-svn: 42477
* This patch fixes all issues mentioned in clattner's feedback of Fariborz Jahanian2007-09-291-5/+4
| | | | | | | September 28, 2007 4:39:24 PM PDT Please let me know if I missed anything. llvm-svn: 42473
* Code clean up. Moved couple of static functions to be private members of ↵Fariborz Jahanian2007-09-292-16/+26
| | | | | | | | Sema class. Avoiding passing a Sema object to these utility functions. llvm-svn: 42472
* Patch to remove use of has table for protocol name lookup. This patch ↵Fariborz Jahanian2007-09-292-19/+26
| | | | | | | | mirrors my previous patch to do the same for class name lookup using a hash table. llvm-svn: 42471
* Removed use of hash table for class decls and do a name look up directly.Fariborz Jahanian2007-09-292-22/+36
| | | | | | | There is still an issue if doing ScopedLookup is an overkill and we can just access the decl using the identifier. llvm-svn: 42463
* Yesterday I discovered that 78% of all selectors in "Cocoa.h" take 0/1 argument.Steve Naroff2007-09-283-22/+22
| | | | | | | | | | | | This motivated implementing a devious clattner inspired solution:-) This approach uses a small value "Selector" class to point to an IdentifierInfo for the 0/1 case. For multi-keyword selectors, we instantiate a MultiKeywordSelector object (previously known as SelectorInfo). Now, the incremental cost for selectors is only 24,800 for Cocoa.h! This saves 156,592 bytes, or 86%!! The size reduction is also the result of getting rid of the AST slot, which was not strictly necessary (we will associate a selector with it's method using another table...most likely in Sema). This change was critical to make now, before we have too many clients. I still need to add some comments to the Selector class...will likely add later today/tomorrow. llvm-svn: 42452
* Patch to warn on umimplemented methods coming from class's Fariborz Jahanian2007-09-282-22/+50
| | | | | | protocols. llvm-svn: 42436
* Patch for method implementation. It populates ObjcImplementationDecl object ↵Fariborz Jahanian2007-09-272-1/+56
| | | | | | | | with method implementation declarations . It checks and warns on those methods declared in class interface and not implemented. llvm-svn: 42412
* Fix some use of uninit variables issues, reported by Anton.Chris Lattner2007-09-271-1/+1
| | | | llvm-svn: 42396
* Add SelectorInfo (similar in spirit to IdentifierInfo). The key difference ↵Steve Naroff2007-09-274-142/+50
| | | | | | | | | | | | | | | | | | | | is SelectorInfo is not string-oriented, it is a unique aggregate of IdentifierInfo's (using a folding set). SelectorInfo also has a richer API that simplifies the parser/action interface. 3 noteworthy benefits: #1: It is cleaner. I never "liked" storing keyword selectors (i.e. foo:bar:baz) in the IdentifierTable. #2: It is more space efficient. Since Cocoa keyword selectors can be quite long, this technique is space saving. For Cocoa.h, pulling the keyword selectors out saves ~180k. The cost of the SelectorInfo data is ~100k. Saves ~80k, or 43%. #3: It results in many API simplifications. Here are some highlights: - Removed 3 actions (ActOnKeywordMessage, ActOnUnaryMessage, & one flavor of ObjcBuildMethodDeclaration that was specific to unary messages). - Removed 3 funky structs from DeclSpec.h (ObjcKeywordMessage, ObjcKeywordDecl, and ObjcKeywordInfo). - Removed 2 ivars and 2 constructors from ObjCMessageExpr (fyi, this space savings has not been measured). I am happy with the way it turned out (though it took a bit more hacking than I expected). Given the central role of selectors in ObjC, making sure this is "right" will pay dividends later. Thanks to Chris for talking this through with me and suggesting this approach. llvm-svn: 42395
* This patch inserts ivars declared in @implementation in its object and verifies Fariborz Jahanian2007-09-262-2/+63
| | | | | | | that they conform(in type, name and numbers) to those declared in @interface. Test case highlights kind of checking we do here. llvm-svn: 42360
* Patch to make ObjcImplementationDecl derived from TypeDecl and supprt legacyFariborz Jahanian2007-09-251-0/+8
| | | | | | objective-c code with no @interface declaration. llvm-svn: 42319
* This patch introduces a new class to keep track of class implementation ↵Fariborz Jahanian2007-09-252-13/+111
| | | | | | | | | info. It also adds more semantic checks for class and protocol declarations. Test cases are good indications of kind of checking being done in this patch. llvm-svn: 42311
* Use APFloat for the representation of FP immediates, ask the targetChris Lattner2007-09-221-3/+17
| | | | | | for *which* apfloat to use for a particular type. llvm-svn: 42234
* This patch adds to new things to clang:Fariborz Jahanian2007-09-221-13/+63
| | | | | | | | 1. Handles saving and checking on protocols used in an @interface declaration 2. Checks and saves class's super class. 3. Adds semantic check to category declarations. llvm-svn: 42218
* Make case sorting deterministic by not depending on pointer Chris Lattner2007-09-211-2/+17
| | | | | | values. Patch mostly by Gabor Greif for PR1682. llvm-svn: 42203
* This patch instantiates objects for forward protocols and in general handles ↵Fariborz Jahanian2007-09-212-6/+61
| | | | | | | | use of protocols referenced in @protocol declarations. llvm-svn: 42191
* Handle forward declaration of classes and prevent re-instantiation ofFariborz Jahanian2007-09-201-16/+24
| | | | | | ObjcInterfaceClass Objects. llvm-svn: 42172
* Match to do some semantic analysis on objective-c class decl.Fariborz Jahanian2007-09-201-2/+19
| | | | | | | 1. Detect used of undeclared/forward declared super class. 2. Detect duplicate definition of a class. llvm-svn: 42168
* Remove SelectorTable/SelectorInfo, simply store all selectors in the central ↵Steve Naroff2007-09-192-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | IdentifierTable. Rationale: We currently have a separate table to unique ObjC selectors. Since I don't need all the instance data in IdentifierInfo, I thought this would save space (and make more sense conceptually). It turns out the cost of having duplicate entries for unary selectors (i.e. names without colons) outweighs the cost difference between the IdentifierInfo & SelectorInfo structures. Here is the data: Two tables: *** Selector/Identifier Stats: # Selectors/Identifiers: 51635 Bytes allocated: 1999824 One table: *** Identifier Table Stats: # Identifiers: 49500 Bytes allocated: 1990316 llvm-svn: 42139
* Remove #include of config.h, it is no longer needed.Steve Naroff2007-09-191-1/+0
| | | | llvm-svn: 42126
* Remove alloca import...Steve Naroff2007-09-181-3/+0
| | | | llvm-svn: 42117
* Progress on message expressions...Steve Naroff2007-09-183-33/+88
| | | | | | | | | | | - Add ObjcMessageExpr AST node and associated constructors. - Add SourceLocation's to ActOnKeywordMessage/ActOnUnaryMessage API. - Instantiate message expressions... - Replace alloca usage with SmallString. Next step, installing a correct type, among other tweaks... llvm-svn: 42116
* Patch for object creation and handling of category declarations.Fariborz Jahanian2007-09-182-2/+28
| | | | llvm-svn: 42104
* alloca.h doesn't exist on Windows.Hartmut Kaiser2007-09-181-0/+3
| | | | llvm-svn: 42089
* alloca.h is needed on SolarisGabor Greif2007-09-181-0/+1
| | | | llvm-svn: 42088
* Uses more description name for method implementation kind argument.Fariborz Jahanian2007-09-182-14/+14
| | | | | | Moves such argument as the last argument and uses defaul value. llvm-svn: 42073
* Patch to remove ObjcProtoMethodDecl and use ObjcMethodDeclFariborz Jahanian2007-09-172-45/+17
| | | | | | instead for @protocol method decls. llvm-svn: 42070
* Patch to add objective-c's @protocl type declaration.Fariborz Jahanian2007-09-172-17/+88
| | | | llvm-svn: 42060
OpenPOWER on IntegriCloud