Граф коммитов

30 Коммитов

Автор SHA1 Сообщение Дата
Nuno Lopes 6b3502c5c3 fix free/delete mismatch problem in add/mergeProperties (found by valgrind)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50945 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-10 10:31:54 +00:00
Fariborz Jahanian 4607034e62 Synthesized getter/setter method declarations need not have
an implementation. This fixes couple of failing prperty tests
caused by my previous patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50830 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-07 20:53:44 +00:00
Fariborz Jahanian 33de3f0333 This patch introduces declaration of getter methods for ObjC2's
properties. Couple of property tests will fail with this patch.
Will fix them next.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50818 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-07 17:43:59 +00:00
Fariborz Jahanian 46b55e56d0 percolate @optional/@required protocols down to ASTs for
properties declared in the protocol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50662 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-05 18:51:55 +00:00
Fariborz Jahanian aebf0cba02 This patch is about merging ObjC2's properties declared in class
protocols into class's property list and performing semantics
on them for while doing so.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50587 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-02 19:17:30 +00:00
Fariborz Jahanian 628b96f34e Patch to build AST for property implementation declarations and
to print declaration from its AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50117 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-23 00:06:01 +00:00
Fariborz Jahanian c70bee863b Allow property in base class to be implemented in a
derived class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50074 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 23:57:08 +00:00
Fariborz Jahanian 559c0c4bbe Continuation of work on ObjC2's properties.
Added iterators, methods to find property and categories.
Use them in doing semantic analysis on property implementation
declarations. Fixed typos.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50050 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21 19:04:53 +00:00
Fariborz Jahanian 3dd4ba4068 Added property decl support for protocols.
Added assertion if unexpected property decls are found where they don't belong.
Consolidated property decl. printing by using a helper function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49862 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-17 18:25:18 +00:00
Fariborz Jahanian d9a3c330b0 Fixed a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49819 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 21:11:25 +00:00
Fariborz Jahanian 7e7e3872b5 This patch adds support for declaraing properties in categories,
just as they are declared in objc classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49817 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-16 21:08:45 +00:00
Fariborz Jahanian 1de1e74541 New AST representation for each objc2's property declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49699 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 23:36:35 +00:00
Fariborz Jahanian dae1a1a2aa AST generation for objc2's property declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49565 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11 23:40:25 +00:00
Steve Naroff d6a07aaf62 Add class and super class location info to ObjCInterfaceDecl...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49553 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-11 19:35:35 +00:00
Chris Lattner 5619688510 Fix a bug I introduced in my const'ification patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49262 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 05:25:03 +00:00
Chris Lattner b048c98359 This patch contains these changes:
-Renamed ContextDecl -> DeclContext
-Removed DeclContext pointer from FieldDecl
-EnumDecl inherits from DeclContext, instead of TagDecl

Patch by Argiris Kirtzidis!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49261 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 04:47:34 +00:00
Chris Lattner e0def7589a fix a number of const qualification bugs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49257 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 04:11:27 +00:00
Chris Lattner 0ed844b04e Introduce ContextDecl, patch by Argiris Kirtzidis!
-Added ContextDecl (no TranslationUnitDecl)
-ScopedDecl class has a ContextDecl member
-FieldDecl class has a ContextDecl member, so that a Field or a ObjCIvar can be traced back to their RecordDecl/ObjCInterfaceDecl easily
-FunctionDecl, ObjCMethodDecl, TagDecl, ObjCInterfaceDecl inherit from ContextDecl. With TagDecl as ContextDecl, enum constants have a EnumDecl as their context.
-Moved Decl class to a "DeclBase.h" along with ContextDecl class
-CurContext is handled by Sema




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49208 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 06:12:32 +00:00
Chris Lattner f4af515457 clean up property memory allocation to move it into the ast classes
like the rest of the classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48434 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-17 01:19:02 +00:00
Chris Lattner 55d13b4d55 make property addition work list all other "add" methods. Do
the allocation in the class, not in sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48433 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 21:23:50 +00:00
Chris Lattner f8d17a5916 add the last two Create methods for decls, woo!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48432 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 21:17:37 +00:00
Chris Lattner 75c9cae5f8 add two more Create methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48428 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 20:53:07 +00:00
Chris Lattner 68c82cf612 simplify the way ObjCCategoryDecl's get their referenced protocols list
specified.  Previously, the ctor would allocate memory for the list and then
it would get filled in later.  Move the allocation+filling in to be more 
consistent with other stuff, e.g. the addMethods method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48427 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 20:47:45 +00:00
Chris Lattner 61f9d41036 Add create methods for ObjCCategoryDecl, ObjCForwardProtocolDecl, ObjCClassDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48426 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 20:34:23 +00:00
Chris Lattner c858105d41 minor cleanups, make getNumInstanceMethods always return unsigned.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48423 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 20:19:15 +00:00
Chris Lattner cca59d77c4 Give ObjCProtocolDecl a Create method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48410 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 01:23:04 +00:00
Chris Lattner 0e77ba0bf7 Add create methods for ObjCIvarDecl and ObjCInterfaceDecl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48408 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 01:15:50 +00:00
Chris Lattner b06fa3b869 remove some dead arguments to ObjCMethodDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48406 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 00:58:16 +00:00
Chris Lattner 6c4ae5de0c Give ObjCMethodDecl a Create method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48405 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 00:49:28 +00:00
Chris Lattner 1e03a561f4 Split objc decl implementation out into DeclObjC.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48404 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-16 00:19:01 +00:00