summaryrefslogtreecommitdiffstats
path: root/clang/AST/Decl.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Unused ObjcProtoMethod is removed.Fariborz Jahanian2007-09-301-3/+0
| | | | llvm-svn: 42485
* Patch for method implementation. It populates ObjcImplementationDecl object ↵Fariborz Jahanian2007-09-271-0/+19
| | | | | | | | with method implementation declarations . It checks and warns on those methods declared in class interface and not implemented. llvm-svn: 42412
* This patch inserts ivars declared in @implementation in its object and verifies Fariborz Jahanian2007-09-261-0/+13
| | | | | | | 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
* This patch introduces a new class to keep track of class implementation ↵Fariborz Jahanian2007-09-251-0/+8
| | | | | | | | | 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
* This patch instantiates objects for forward protocols and in general handles ↵Fariborz Jahanian2007-09-211-0/+9
| | | | | | | | use of protocols referenced in @protocol declarations. llvm-svn: 42191
* Patch for object creation and handling of category declarations.Fariborz Jahanian2007-09-181-1/+27
| | | | llvm-svn: 42104
* Patch to remove ObjcProtoMethodDecl and use ObjcMethodDeclFariborz Jahanian2007-09-171-2/+2
| | | | | | instead for @protocol method decls. llvm-svn: 42070
* Patch to add objective-c's @protocl type declaration.Fariborz Jahanian2007-09-171-0/+20
| | | | llvm-svn: 42060
* Add const to debug hook...Steve Naroff2007-09-171-1/+1
| | | | llvm-svn: 42025
* Add support for ObjC keyword selectors.Steve Naroff2007-09-171-3/+32
| | | | | | | | | | - Add SelectorInfo/SelectorTable classes, modeled after IdentifierInfo/IdentifierTable. - Add SelectorTable instance to ASTContext, created lazily through ASTContext::getSelectorInfo(). - Add SelectorInfo slot to ObjcMethodDecl. - Add helper function to derive a SelectorInfo from ObjcKeywordInfo. Misc: Got the Decl stats stuff up and running again...it was missing support for ObjC AST's. llvm-svn: 42023
* decl counting isn't implemented yet for objc. -stats probably crashes for it.Chris Lattner2007-09-161-0/+7
| | | | | | Patch by Justin Handville llvm-svn: 42009
* Fixes/tweaks that prevent "defaults-i.m" from compiling.Steve Naroff2007-09-161-0/+36
| | | | | | | - Allow classnames as the receiver (removing a FIXME from ParseObjCMessageExpression). - Added a FIXME to ParseObjCMessageExpression()...we need to return a message expr AST node! llvm-svn: 42001
* Patch to store ivars into interface class object.Fariborz Jahanian2007-09-141-0/+12
| | | | llvm-svn: 41961
* Phase 2 of making the Decl class more lightweight...Steve Naroff2007-09-131-1/+7
| | | | | | | | Move Identifier/Loc instance variables (and associated getters/setters) down from Decl to ScopedDecl/FieldDecl. Objc AST's can now inherit from Decl without getting instance variables and types that are C specific. For now, I am keeping NextDeclarator, since I believe it may be useful to ObjC. If not, it can be moved later. llvm-svn: 41934
* Patch for building method declaration nodes. Also fixed a segfault in ↵Fariborz Jahanian2007-09-121-0/+16
| | | | | | | | cocoa.m due to use of @property. llvm-svn: 41880
* Early patch to collect objective-c methods inserts them inFariborz Jahanian2007-09-101-0/+20
| | | | | | class object. llvm-svn: 41801
* The goal of this commit is to get just enough Sema support to recognize ↵Steve Naroff2007-09-061-0/+4
| | | | | | | | | | | Objective-C classes as types. That said, the AST nodes ObjcInterfaceDecl, ObjcInterfaceType, and ObjcClassDecl are *very* preliminary. The good news is we no longer need -parse-noop (aka MinimalActions) to parse cocoa.m. llvm-svn: 41752
* Fix "no newline at end of file" warnings. Patch contributed byChris Lattner2007-07-121-1/+1
| | | | | | Benoit Boissinot! llvm-svn: 39780
* Finally bite the bullet and make the major change: split the clang namespaceChris Lattner2007-06-151-1/+0
| | | | | | | | | | | | | out of the llvm namespace. This makes the clang namespace be a sibling of llvm instead of being a child. The good thing about this is that it makes many things unambiguous. The bad things is that many things in the llvm namespace (notably data structures like smallvector) now require an llvm:: qualifier. IMO, libsystem and libsupport should be split out of llvm into their own namespace in the future, which will fix this issue. llvm-svn: 39659
* Implement support for formal arguments. We can now compile this:Chris Lattner2007-06-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | int test(int X, short Y, float Z) { return (int)(X*Y+Z); } to: define i32 @test(i32 %X, i16 %Y, float %Z) { entry: %promote = sext i16 %Y to i32 ; <i32> [#uses=1] %mul = mul i32 %promote, %X ; <i32> [#uses=1] %promote3 = sitofp i32 %mul to float ; <float> [#uses=1] %add = add float %promote3, %Z ; <float> [#uses=1] %conv = fptosi float %add to i32 ; <i32> [#uses=1] ret i32 %conv } with: $ clang -emit-llvm t.c | llvm-as | opt -std-compile-opts | llvm-dis llvm-svn: 39652
* Implement capturing of enum values and chaining of enums together.Chris Lattner2007-06-111-15/+0
| | | | llvm-svn: 39644
* Bug #:Steve Naroff2007-06-011-12/+1
| | | | | | | | Submitted by: Reviewed by: Add implemention file for GCC attributes llvm-svn: 39542
* Bug #:Steve Naroff2007-06-011-0/+10
| | | | | | | | | | | | | | | Submitted by: Reviewed by: Implement support for GCC __attribute__. - Implement "TODO" in Parser::ParseAttributes. Changed the return type from void to Parser::DeclTy. Changed all call sites to accept the return value. - Added Action::ParseAttribute and Sema::ParseAttribute to return an appropriate AST node. Added new node AttributeDecl to Decl.h. Still to do...hook up to the Decl... llvm-svn: 39539
* correct printout, enums are separate.Chris Lattner2007-05-241-7/+7
| | | | llvm-svn: 39492
* silence a bunch of warnings, fix some funky indentation.Chris Lattner2007-05-241-58/+66
| | | | llvm-svn: 39487
* Bug #:Steve Naroff2007-05-231-0/+81
| | | | | | | | | | | Submitted by: Reviewed by: Added "global" statistics gathering for Decls/Stmts/Exprs. Very useful for working with a single file. When we start compiling multiple files, will need to enhance this to collect stats on a per-module basis. llvm-svn: 39485
* Bug #:Steve Naroff2007-03-261-2/+15
| | | | | | | | | | | | | Submitted by: Reviewed by: Finish up Sema::ParseMemberReferenceExpr. This involved: - added a getMember() function to RecordDecl. - added stronger typing for "Members" (from Decl->FieldDecl). - added a dignostic for members not found. - changed MemberExpr to install the correct TypeRef. - In general, simplified and cleaned up the routing. llvm-svn: 39364
* Create EnumConstantDecl objects for each enum value, and fill them intoChris Lattner2007-01-251-0/+15
| | | | | | | the EnumDecl when the enum type is complete. This allows us to detect redefinitions of enums. llvm-svn: 39300
* Add EnumDecl, warn about forward references to enums:Chris Lattner2007-01-251-5/+5
| | | | | | | | t.c:2:6: warning: ISO C forbids forward references to 'enum' types enum foo22* X; ^ llvm-svn: 39299
* Save the member list of a struct/union in the RecordDecl for the struct.Chris Lattner2007-01-251-0/+14
| | | | llvm-svn: 39297
* make Decl::getName() not crash if the decl is unnamed (e.g. an unnamed argument)Chris Lattner2007-01-211-1/+3
| | | | llvm-svn: 39260
* avoid allocating memory for empty arg listsChris Lattner2007-01-211-2/+5
| | | | llvm-svn: 39255
* Next big step in function parsing: create decl objects for parameters,Chris Lattner2007-01-211-0/+17
| | | | | | | inserting them into the function body scope and registering them with the corresponding FunctionDecl. llvm-svn: 39253
* parse identifier expressions properly. This allows us diagnose this:Chris Lattner2006-11-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | typedef int X; int A() { return X; } int B() { return Y; } as: /Users/sabre/test.c:5:10: error: unexpected type name 'X': expected expression return X; ^ /Users/sabre/test.c:9:10: error: use of undeclared 'Y' value return Y; ^ llvm-svn: 39192
* Make the driver print function bodies at -parse-print-astChris Lattner2006-10-251-0/+5
| | | | llvm-svn: 39048
* start creating proper ast nodes for variables and functionsChris Lattner2006-10-151-0/+15
llvm-svn: 38991
OpenPOWER on IntegriCloud