History log of /external/clang/lib/AST/DeclObjC.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/AST/DeclObjC.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/AST/DeclObjC.cpp
4e7f00c74487bca84993a1f35d0a26a84ed2b1a0 25-Oct-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC: under -Wunused-property-ivar warn if property's
backing warning is not used in one of its accessor methods.
// rdar://14989999


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
bc6509175e1ce5cc1b48d1b97ac8d23d8b74167c 17-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Rename some functions for consistency.

Every other function in Redeclarable.h was using Decl instead of Declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
07b1bbe648a21b8cdbc073fb6a409422c49921bb 10-Jul-2013 Fariborz Jahanian <fjahanian@apple.com> ObjC migrator: Improve on hueristics.
migrate to 'copy attribute if Object
class implements NSCopying otherwise
assume implied 'strong'. Remove
lifetime qualifier on property as it has
moved to property's attribute. Added TODO
comment for future work by poking into
setter implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
df08c4b371522025d1d3aec4992fb0f27d7c4571 30-May-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix potential infinite loop when iterating over redeclarations of an ObjMethodDecl, resulting from invalid code.

Check for invalid decls in ObjCMethodDecl::getNextRedeclaration(); otherwise if we start from an invalid redeclaration
of an @implementation we would move to the @interface and not reach the original declaration again.

Fixes rdar://14024851

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
8dbda516d343706bae904f800c6d64e145d58a8c 20-May-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C [qoi]: When an class conforms to multiple
protocols that declare the same property of incompatible
types, issue a warning when class implementation synthesizes
the property. // rdar://13075400


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
5543169296beeb183b9c9392debc774fcf493eeb 05-May-2013 Dmitri Gribenko <gribozavr@gmail.com> Replace ArrayRef<T>() with None, now that we have an implicit ArrayRef constructor from None

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
634c5634817b9ad384a706fe87ab302985566bba 03-May-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep track of an @implementation's super class name location, if one was provided.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
f3f0f357f8d6b4511b6d605cc8a39ae3787fef6d 25-Apr-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: This is a small modification to my
patch -n r180198.
When reporting on missing property accessor implementation in
categories, do not report when they are declared in primary class,
class's protocol, or one of it super classes or in of the other
categories. // rdar://13713098


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
c775b1a0702621e297d00452a897381c8bf10f3f 24-Apr-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: When reporting on missing property accessor implementation in
categories, do not report when they are declared in primary class,
class's protocol, or one of it super classes. This is because,
its class is going to implement them. // rdar://13713098


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
e7a77727804c12750cb39e8732e26f2a26e4ce0f 17-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use the extra info in global method pool to speed up looking for ObjC overridden methods.

When we are in a implementation, we check the global method pool whether there were category
methods with the same selector. If there were none (common case) we don't need to do lookups for
overridden methods again.

Note that for an interface method (if we don't encounter its implementation), it is considered that
it overrides methods that were declared before it, not for category methods introduced after it.

This is tradeoff in favor of performance, since it is expensive to do lookups in case there was a
category, and moving the global method pool to ASTContext (so we can check it) would increase complexity.

rdar://13508196

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179654 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
77670f17ae3a5c3188149c19a7e386c01d0aa7c0 15-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert "Speed-up ObjCMethodDecl::getOverriddenMethods()."

This reverts commit r179436.

Due to caching, it was possible that we could miss overridden methods that
were introduced by categories later on.

Along with reverting the commit I also included a test case that would have caught this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
175c8e2e57befe2db15dd339ab5eb27d0c2b6013 13-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Speed-up ObjCMethodDecl::getOverriddenMethods().

Use an newly introduce ASTContext::getBaseObjCCategoriesAfterInterface() which caches its
results instead of re-calculating the categories multiple times.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
04593d0f9d84f6adf942bd66f1587e05c6a47c42 29-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> When looking for overridden ObjC methods, don't ignore 'hidden' ones.

When using modules we should not ignore overridden methods from
categories that are hidden because the module is not visible.
This will give more consistent results (when imports change) and it's more
correct since the methods are indeed overridden even if they are not "visible"
for lookup purposes.

rdar://13350796

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
5bdaef55d486f20346fe16f3d41324694d3ff0d5 21-Mar-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: Tighten the rules when warning
is issused for on overriding 'readwrite'
property which is not auto-synthesized.
Buttom line is that if hueristics determine
that there will be a user implemented setter,
no warning will be issued. // rdar://13388503


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
6d1cb5c62671b0ab4d9c023addf80562d7a45fd1 12-Mar-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: Fixes a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
4919de6a53a007487c6d6b173921b5e7152a2004 06-Mar-2013 Adrian Prantl <aprantl@apple.com> Ensure that DIType is regenerated after we visit an implementation
that adds ivars to an interface.

Fixes rdar://13175234

This is an update to r176116 that performs a smart caching of interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
10b4df7ff21076c21ca764f8ca38ccaff7888f25 27-Feb-2013 Adrian Prantl <aprantl@apple.com> Temporarily revert r176116 for compile-time performance regression.

This reverts commit ea95e4587fd13606fbf63b10a07a7d02026aa39c.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176151 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
58c79037256c77ffdbaa0da12205777e239fe096 26-Feb-2013 Adrian Prantl <aprantl@apple.com> Ensure that DIType is regenerated after we visited an implementation that adds ivars to an interface. Fixes rdar://13175234

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
cfaed8d399a34e79fbab9f70eb4ea1bbeb81a02b 14-Feb-2013 Fariborz Jahanian <fjahanian@apple.com> objective-C: synthesize properties in order of their
declarations to synthesize their ivars in similar
determinstic order so they are laid out in
a determinstic order. // rdar://13192366


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
2c5d8459f12549dc48654a4da33c085835831d1d 13-Feb-2013 Fariborz Jahanian <fjahanian@apple.com> objective-C: Make order of ivars which are synthesized
in the course of property synthesis deterministic (ordered
by their type size), instead of having hashtable order
(as it is currently). // rdar://13192366


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
6bd992946bda92193fadce7e4890d4465d2702f4 09-Feb-2013 Douglas Gregor <dgregor@apple.com> Ensure that type definitions present in just-loaded modules are
visible.

The basic problem here is that a given translation unit can use
forward declarations to form pointers to a given type, say,

class X;
X *x;

and then import a module that includes a definition of X:

import XDef;

We will then fail when attempting to access a member of X, e.g.,

x->method()

because the AST reader did not know to look for a default of a class
named X within the new module.

This implementation is a bit of a C-centric hack, because the only
definitions that can have this property are enums, structs, unions,
Objective-C classes, and Objective-C protocols, and all of those are
either visible at the top-level or can't be defined later. Hence, we
can use the out-of-date-ness of the name and the identifier-update
mechanism to force the update.

In C++, we will not be so lucky, and will need a more advanced
solution, because the definitions could be in namespaces defined in
two different modules, e.g.,

// module 1
namespace N { struct X; }

// module 2
namespace N { struct X { /* ... */ }; }

One possible implementation here is for C++ to extend the information
associated with each identifier table to include the declaration IDs
of any definitions associated with that name, regardless of
context. We would have to eagerly load those definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
0f9b9f37941ea709104f02d7dbe4ea18ab457605 17-Jan-2013 Douglas Gregor <dgregor@apple.com> Treat hidden Objective-C protocol definitions as if they were
undefined, and don't find methods or protocols within those protocol
definitions. This completes <rdar://problem/10634711>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
d329724745b49f894b768d47275b7c2713106e89 17-Jan-2013 Douglas Gregor <dgregor@apple.com> Rework the traversal of Objective-C categories and extensions to
consider (sub)module visibility.

The bulk of this change replaces myriad hand-rolled loops over the
linked list of Objective-C categories/extensions attached to an
interface declaration with loops using one of the four new category
iterator kinds:

visible_categories_iterator: Iterates over all visible categories
and extensions, hiding any that have their "hidden" bit set. This is
by far the most commonly used iterator.

known_categories_iterator: Iterates over all categories and
extensions, ignoring the "hidden" bit. This tends to be used for
redeclaration-like traversals.

visible_extensions_iterator: Iterates over all visible extensions,
hiding any that have their "hidden" bit set.

known_extensions_iterator: Iterates over all extensions, whether
they are visible to normal name lookup or not.

The effect of this change is that any uses of the visible_ iterators
will respect module-import visibility. See the new tests for examples.

Note that the old accessors for categories and extensions are gone;
there are *Raw() forms for some of them, for those (few) areas of the
compiler that have to manipulate the linked list of categories
directly. This is generally discouraged.

Part two of <rdar://problem/10634711>.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
c328d9c22a4397dd7313d06be5b82d700297b246 12-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> comment parsing: when property accessors don't have comment
of their own (or are syntheszed), use prperty's comment.
for them. // rdar://12791315


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
cc5a28a1a10e966ae176957d9fd21b03951f600e 07-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring of my last patch
related to // rdar://12958878


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
32b94bedc6a789e4091626e7433e73555cf9df00 07-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> objective-C: when searching for declarations in protocol
list of classes, etc., make sure to look into protocol
definitions. // rdar://12958878


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3bc93e3124ad5e7191c4a12dc981c8ee53578193 19-Dec-2012 David Blaikie <dblaikie@gmail.com> Change DeclContextLookup(Const)Result to (Mutable)ArrayRef<NamedDecl*>, as per review discussion in r170365

This does limit these typedefs to being sequences, but no current usage
requires them to be contiguous (we could expand this to a more general
iterator pair range concept at some point).

Also, it'd be nice if SmallVector were constructible directly from an ArrayRef
but this is a bit tricky since ArrayRef depends on SmallVectorBaseImpl for the
inverse conversion. (& generalizing over all range-like things, while nice,
would require some nontrivial SFINAE I haven't thought about yet)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
2fa67efeaf66a9332c30a026dc1c21bef6c33a6c 01-Dec-2012 Benjamin Kramer <benny.kra@googlemail.com> Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull in all the generated Attr code.

Required to pull some functions out of line, but this shouldn't have a perf impact.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
e63aedd0cb064fc106636ad856cc0e645e6374ce 31-Oct-2012 Anna Zaks <ganna@apple.com> Address Jordan's review: comments, spaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
b36ea375e20f71df19c101fa2399b7ea3a607e04 18-Oct-2012 Anna Zaks <ganna@apple.com> Factor CollectClassPropertyImplementations out of Sema into AST

This would make it possible for the analyzer to use the function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
50d2b268d7a49719fe9dae89195ff809c4572dbf 11-Oct-2012 Jordan Rose <jordan_rose@apple.com> ObjCMethodDecl::findPropertyDecl: bail out early if not an instance method.

Currently, Objective-C does not support class properties, even though it
allows calling class methods with dot syntax.

No intended functionality change; purely optimization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
bf967be66ea8c51b66c61659c23240f762a56dbe 10-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> [Doc parsing] This patch searches overridden objc/c++
methods looking for documentation on a particular base
class inherited by any method that overrides the base class.
In case of redeclaration, as when objc method is defined
in the implementation, it also looks up for documentation
in class/class extension being redeclared.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
04bec39d61f2b392d798882c9141fecf3ca653c5 10-Oct-2012 Jordan Rose <jordan_rose@apple.com> Move Sema::PropertyIfSetterOrGetter to ObjCMethodDecl::findPropertyDecl.

Then, switch users of PropertyIfSetterOrGetter and LookupPropertyDecl
(the latter by name) over to findPropertyDecl. This actually makes
-Wreceiver-is-weak a bit stronger than it was before.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
1e4691b9d8e1bdcc8ef62b323969d702c51b3c08 10-Oct-2012 Jordan Rose <jordan_rose@apple.com> Rename ObjCMethodDecl::isSynthesized to isPropertyAccessor.

This more accurately reflects its use: this flag is set when a method
matches the getter or setter name for a property in the same class,
and does not actually specify whether or not the definition of the method
will be synthesized (either implicitly or explicitly with @synthesize).

This renames the setter and backing field as well, and changes the
(soon-to-be-obsolete?) XML dump format to use 'property_accessor'
instead of 'synthesized'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
740ae67dbf8dac44dbc8d6593a60f4f37a0a2aa5 09-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move the functionality that looks for ObjC overridden methods from
ASTContext to the ObjCMethodDecl, and have the more generic
ASTContext::getOverriddenMethods() use the ObjCMethodDecl::getOverriddenMethods()
function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165518 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
5456b0fe40714a78cd0ba7c1a5b7dc34eda385af 09-Oct-2012 Douglas Gregor <dgregor@apple.com> When we load a function or method body from an AST file, we check
whether that function/method already has a body (loaded from some
other AST file), as introduced in r165137. Delay this check until
after the redeclaration chains have been wired up.

While I'm here, make the loading of method bodies lazy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
ad0ce53c8219456938405b84c5d13341a47e3d94 27-Sep-2012 Anna Zaks <ganna@apple.com> Make getDefaultSynthIvarName() a member of ObjCPropertyDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
ca93ee707d9570b74d24c7d55defe18dac38bcc0 30-Jul-2012 Anna Zaks <ganna@apple.com> Mark ObjCInterfaceDecl::lookupPrivateMethod as const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
e61354b274ec5aa6acf3d15271896ce7596bb123 27-Jul-2012 Anna Zaks <ganna@apple.com> Consolidate ObjC lookupPrivateMethod methods from Sema and DeclObjC.

Also, fix a subtle bug, which occurred due to lookupPrivateMethod
defined in DeclObjC.h not looking up the method inside parent's
categories.

Note, the code assumes that Class's parent object has the same methods
as what's in the Root class of a the hierarchy, which is a heuristic
that might not hold for hierarchies which do not descend from NSObject.
Would be great to fix this in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
ffb0c3adc27d257c8453886957b8d220d1ad14d8 20-Jul-2012 Eric Christopher <echristo@apple.com> Remove HasSynthBitfield and all callers/writers/etc. Also remove
previous ResetObjCLayout calls since this is now handled in Sema.

Part of rdar://11842763

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
a0cff720d40f239fee0e5ecc8378122b456c1991 16-Jun-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [AST/libclang] Fix the selector locations that are reported for a
method definition that has its '{' attached to the method name without
a space.

With a method like:

-(id)meth{
.....
}

the logic in ObjCMethodDecl that determined the selector locations got
confused because it was initialized based on an end location for '{' but
that end location changed to '}' after the method was finished.

Fix this by having an immutable end location for the declarator and
for getLocEnd() get the end location from the body itself.

Fixes rdar://11659739.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
1c3a46aa5a55068c3107e659333ccf10f6dab843 16-Jun-2012 James Dennett <jdennett@google.com> Documentation cleanup: escape Objective-C @keywords in Doxygen comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
581deb3da481053c4993c7600f97acf7768caac5 06-Jun-2012 David Blaikie <dblaikie@gmail.com> Revert Decl's iterators back to pointer value_type rather than reference value_type

In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.

This rolls back r155808 and r155869.

Review by Doug Gregor incorporating feedback from Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
262bc18e32500558af7cb0afa205b34bd37bafed 30-Apr-2012 David Blaikie <dblaikie@gmail.com> Remove the ref/value inconsistency in filter_decl_iterator.

filter_decl_iterator had a weird mismatch where both op* and op-> returned T*
making it difficult to generalize this filtering behavior into a reusable
library of any kind.

This change errs on the side of value, making op-> return T* and op* return
T&.

(reviewed by Richard Smith)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
bf393be8a0b8b573ceb23ed19ac953832a2a69e4 06-Apr-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: Don't warn when a category does not implement a method
declared in its adopted protocol when another category declares it
because that category will implement it. // rdar://11186449


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
a5f4441de7890953460d95f4e88b9fa432b48dc2 13-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [Sema] Prefer to use ObjCInterfaceDecl's protocol_begin()/protocol_end() iterators instead of
ObjCInterfaceDecl::getReferencedProtocols(), because the iterators are safe to use
even if the caller did not check that the interface is a definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d 11-Mar-2012 David Blaikie <dblaikie@gmail.com> Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
5a61e0c4229dc82617a37a68ac2fc08d46e00488 02-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [Sema] Fix crash-on-invalid-code issue:

@class I;
@implementation I(cat) // crashes here
@end

rdar://10968158

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
77bfb8b43ec3f7dee3a71f6e854b03ad29dab84f 29-Feb-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: provide fixit hint when atomic property does not
have matching user defined setter/getter and a warning is issued.
In this case, a fixit note is displayed. // rdar://10267155


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
af300298ab86752fa64e339ba34195888a830756 20-Feb-2012 Fariborz Jahanian <fjahanian@apple.com> modern objc translator. Finish off first cut of the
modern meta-data translation by commenting out private ivar
declarations in user source. Also, added several tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
bb3d14e55d267bf5228699c7bf0c8ccdb71c8f46 09-Feb-2012 Fariborz Jahanian <fjahanian@apple.com> objc: If a method is not implemented in the category implementation but
has been declared in its primary class, superclass,
or in one of their protocols, no need to issue unimplemented method.
// rdar://10823023


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
f978059b82db8c0d849c5f992036210b5ca53200 07-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Switch the ObjC*Decl raw_stream overloads to take a reference, for consistency with NamedDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
a6ea10e22b600d92e084f6b11b9b9a92d0eb2412 17-Jan-2012 Douglas Gregor <dgregor@apple.com> Delay the creation of the built-in Objective-C class 'Protocol' by
moving it from a "special type" to a predefined declaration, as we do
for id, Class, and SEL.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
cc32b44ea4b3c702bf84eae0af27ca160bd90831 15-Jan-2012 Douglas Gregor <dgregor@apple.com> When deserializing the definition of a C++ class/ObjC class/ObjC
protocol, record the definition pointer in the canonical declaration
for that entity, and then propagate that definition pointer from the
canonical declaration to all other deserialized declarations. This
approach works well even when deserializing declarations that didn't
know about the original definition, which can occur with modules.

A nice bonus from this definition-deserialization approach is that we
no longer need update records when a definition is added, because the
redeclaration chains ensure that the if any declaration is loaded, the
definition will also get loaded.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
1e68ecc4fcce12f683c4fd38acfd1a004001b04f 05-Jan-2012 Douglas Gregor <dgregor@apple.com> When creating declarations that are deserialized from an module file,
go through a central allocation routine
Decl::AllocateDeserializedDecl(). No actual functionality change (yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
c9d3c7edb513e9b8a6ab65b04133653e71d7a72b 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Eliminate the ForwardDecl/InitiallyForwardDecl bits from ObjCProtocolDecl. They are no longer needed

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
bd9482d859a74bf2c45ef8b8aedec61c0e1c8374 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Eliminate ObjCForwardProtocolDecl, which is redundant now that
ObjCProtocolDecl modules forward declarations properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
27c6da284f90e32cda0ec8f52a2b6ba5a2613252 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Wire up redeclaration chains for Objective-C protocols, so that both
forward declarations and definitions of an Objective-C protocol are
represented within a single chain of ObjCProtocolDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
1d784b277cdfd4eba03680715d2a082b3f28d295 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Introduce the core infrastructure needed to model redeclaration chains
for Objective-C protocols, including:
- Using the first declaration as the canonical declaration
- Using the definition as the primary DeclContext
- Making sure that all declarations have a pointer to the definition
data, and that we know which declaration is the definition
- Serialization support for redeclaration chains and for adding
definitions to already-serialized declarations.

However, note that we're not taking advantage of much of this code
yet, because we're still re-using ObjCProtocolDecls.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
5e2a1ff9f28d2eab256d2553e76a9c9d54693875 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Move the data that corresponds to the definition of a protocol into a
separately-allocated DefinitionData structure. Introduce various
functions that will help with the separation of declarations from
definitions (isThisDeclarationADefinition(), hasDefinition(),
getDefinition()).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
375bb1413c041055262c8a416f20d10474a5eda9 27-Dec-2011 Douglas Gregor <dgregor@apple.com> Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDecl
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
/external/clang/lib/AST/DeclObjC.cpp
712ef874534ee1bef41d1aa4664ae36148ec8b12 23-Dec-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Use class definition AST in several situations when
building related objc ASTs which require a class definition AST.
These were uncovered when testing objc rewriter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
99ba9e3bd70671f3441fb974895f226a83ce0e66 20-Dec-2011 David Blaikie <dblaikie@gmail.com> Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
fd002a7027e47ddd4bc9f32b158b18ab0ebd29c7 16-Dec-2011 Douglas Gregor <dgregor@apple.com> Make sure we're always setting the previous declaration of an ObjCInterfaceDecl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
8d2dbbf9ddfd9d762a341d83f83d840ff68ce03d 16-Dec-2011 Douglas Gregor <dgregor@apple.com> If there is a definition of an ObjCInterfaceDecl, make it the Decl returned from the corresponding ObjCInterfaceType

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146740 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
0af550115df1f57f17a4f125ff0e8b34820c65d1 16-Dec-2011 Douglas Gregor <dgregor@apple.com> Fix chaining of ObjCInterfaceDecl redeclarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
7723fec9b45b7258c0eddf4cbfd0d335348f5edc 15-Dec-2011 Douglas Gregor <dgregor@apple.com> Keep track of all declarations of an Objective-C class (both forward
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?"



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
26fec63b14565e9e2d8c9935b276b99be950444a 15-Dec-2011 Douglas Gregor <dgregor@apple.com> Extend ObjCInterfaceDecl::DefinitionData to contain a pointer to the
definition, and implement ObjCInterfaceDecl::getDefinition()
efficiently based on that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146669 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
53df7a1d34f21d8f2309311d1067d463e9064c60 15-Dec-2011 Douglas Gregor <dgregor@apple.com> Introduce the core infrastructure needed to model a complete
redeclaration chain for Objective-C classes, including:
- Using the first declaration as the canonical declaration.
- Using the definition as the primary DeclContext
- Making sure that all declarations have a pointer to the definition
data, and the definition knows that it is the definition.
- Serialization support for when a definition gets added to a
declaration that comes from an AST file.

However, note that we're not taking advantage of much of this code
yet, because we're still re-using ObjCInterfaceDecls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
2e5c15be82f362611c5928ce853d0685ff98c766 15-Dec-2011 Douglas Gregor <dgregor@apple.com> Move the definition-specific data of ObjCInterfaceDecl into a
separately-allocated DefinitionData structure, which we manage the
same way as CXXRecordDecl::DefinitionData. This prepares the way for
making ObjCInterfaceDecls redeclarable, to more accurately model
forward declarations of Objective-C classes and eliminate the mutation
of ObjCInterfaceDecl that causes us serious trouble in the AST reader.

Note that ObjCInterfaceDecl's accessors are fairly robust against
being applied to forward declarations, because Clang (and Sema in
particular) doesn't perform RequireCompleteType/hasDefinition() checks
everywhere it has to. Each of these overly-robust cases is marked with
a FIXME, which we can tackle over time.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146644 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
af764723bf94f8cc7596e2b2f2a97766d188ed98 14-Dec-2011 Douglas Gregor <dgregor@apple.com> Eliminate the vistigial ObjCClassDecl::ObjCClassRef, and inline its
members into ObjCClassDecl, saving ourselves one pointer per forward
declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
c6994005dc9f677c831b8e90bdab483cc2197c29 09-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Save category name loc in ObjCCategoryImplDecl, patch by Jason Haslam!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
40f57ee2dab3ed3475fa584f83f05bd3c9ed4a00 15-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use Decl's isImplicit field to indicate whether an ObjCInterfaceDecl is 'ImplicitInterfaceDecl',
no need to store it in another field.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
2bbcd5ce370753c86d312d2c72a97476ac35b073 14-Nov-2011 Ted Kremenek <kremenek@apple.com> ARC: make assignment to 'self' within class methods illegal. Fixes <rdar://problem/10416568>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
ad834d534e9a5db3d3baa09593775f83ceaff1f2 12-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] When completing an objc forward reference, do not serialize the chain of its categories because
it is going to be rewritten (and the chain will be serialized again), otherwise we may form a cycle in its
categories list when deserializing.

Also introduce ASTMutationListener::CompletedObjCForwardRef to notify that a forward reference
was completed; using Decl's isChangedSinceDeserialization/setChangedSinceDeserialization
is bug inducing and kinda gross, we should phase it out.

Fixes infinite loop in rdar://10418538.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3045ce71304ec8ddef34ced5ee9fa9303f12432e 25-Oct-2011 Ted Kremenek <kremenek@apple.com> Relax restriction of assigning to 'self' in ARC when a method is attributed with ns_consumes_self. Fixes <rdar://problem/10274056>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
7c81c2a5915878e4aa6908a097290fd47fb3a154 19-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't forget to complete the objc interface before asking for information,
otherwise lldb will suffer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142471 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
6d4740e740f9c109c76c111cc90a63f6a24f6357 17-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Have ObjCMethodDecl::getCanonicalDecl take into account redeclared methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
b05d7b20171bbd2feb14b059f39332cbe1bf1014 17-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep track when a ObjC interface/protocol was initially created as a forward reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
72b2625aa67c8213acaf4bf6209b67859d60e2cf 14-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [PCH] Serialize info about redeclared objc methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3a919e7110407ae7609bb6edc57aac16a5990661 14-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Really protect from infinite loop when there are objc method redeclarations.

Serialization part will come later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
b40034c2e580ab3b08de9dfb738d8e5d8ef79136 14-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep track of objc method redeclarations in the same interface.

Avoid possible infinite loop when iterating over an ObjCMethod's redeclarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
1711fc91efb36d131f7ba771f73f0154dc1abd1f 04-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Improve location fidelity of objc decls.

-Add the location of the class name to all objc container decls, not just ObjCInterfaceDecl.
-Make objc decls consistent with the rest of the NamedDecls and have getLocation() point to the
class name, not the location of '@'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
491306a83c4f0f49f95a3bcbca8580cb98a91c7a 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow getting all source locations of selector identifiers in a ObjCMethodDecl.

Instead of always storing all source locations for the selector identifiers
we check whether all the identifiers are in a "standard" position; "standard" position is

-Immediately before the arguments: -(id)first:(int)x second:(int)y;
-With a space between the arguments: -(id)first: (int)x second: (int)y;
-For nullary selectors, immediately before ';': -(void)release;

In such cases we infer the locations instead of storing them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
11d77169555480ee0a04c6e5bc390d8fde41175d 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Pass from the parser the locations of selector identifiers when creating
objc method decls.

They are not stored in the AST yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
da92a7f91cf88f49e02050919676f7fb8e3bdff8 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't keep NumSelectorArgs in the ObjCMethodDecl, the number can be derived from the selector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Removing a bunch of dead returns/breaks after llvm_unreachables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Switch assert(0/false) llvm_unreachable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
e6b8d68a927368b06ac06cc9ac9e7f60aa966d5f 01-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support importing of ObjC categories from modules.

The initial incentive was to fix a crash when PCH chaining categories
to an interface, but the fix was done in the "modules way" that I hear
is popular with the kids these days.

Each module stores the local chain of categories and we combine them
when the interface is loaded. We also warn if non-dependent modules
introduce duplicate named categories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
955fadbdfecfa24a590febe66a86519096787f2d 30-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove a few mutating ObjCCategoryDecl methods.

Remove
-setClassInterface
-setNextClassCategory
-insertNextClassCategory

and combine them in the Create function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
80cb6e69d9e85231588ae604e4bc2bc9a07389af 29-Aug-2011 Nico Weber <nicolasweber@gmx.de> Warn on missing [super finalize] calls.

This matches gcc's logic. Second half of PR10661.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
95ed7784a335aca53b0c6e952cf31a4cfb633360 27-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Treat top-level objective-c declarations
, such as list of forward @class decls, in a DeclGroup
node. Deal with its consequence throught clang. This
is in preparation for more Sema work ahead. // rdar://8843851.
Feel free to reverse if it breaks something important
and I am unavailable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3060178ad9df29789505c1e6debcfc80a3a13587 18-Aug-2011 Chad Rosier <mcrosier@apple.com> Fix else style. No functionality change intended.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
75cf3e86d33ce810c12084126385371b335c30ba 17-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Mark objc methods that are implicitly declared for properties (not user-declared) as implicit.
This results in libclang ignoring such methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
da6d976b0f2470bb3f854913bc3af3245845ad60 22-Jul-2011 John McCall <rjmccall@apple.com> Move this ObjCImplementationDecl member function into libAST
where it belongs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
9670e179a67d868e171feac44fb8f9e2f108c5e8 06-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: enforce performSelector rules in rejecting retaining selectors
passed to it, and unknown selectors causing potential leak.
// rdar://9659270


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134449 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
7acddacc921cd0b3f813443a8641eeddb82dfbd4 17-Jun-2011 John McCall <rjmccall@apple.com> Objective-C fast enumeration loop variables are not retained in ARC, but
they should still be officially __strong for the purposes of errors,
block capture, etc. Make a new bit on variables, isARCPseudoStrong(),
and set this for 'self' and these enumeration-loop variables. Change
the code that was looking for the old patterns to look for this bit,
and change IR generation to find this bit and treat the resulting
variable as __unsafe_unretained for the purposes of init/destroy in
the two places it can come up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
f85e193739c953358c865005855253af4f68a497 16-Jun-2011 John McCall <rjmccall@apple.com> Automatic Reference Counting.

Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.

Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
926df6cfabf3eaa4afc990c097fa4619b76a9b57 11-Jun-2011 Douglas Gregor <dgregor@apple.com> Implement Objective-C Related Result Type semantics.

Related result types apply Cocoa conventions to the type of message
sends and property accesses to Objective-C methods that are known to
always return objects whose type is the same as the type of the
receiving class (or a subclass thereof), such as +alloc and
-init. This tightens up static type safety for Objective-C, so that we
now diagnose mistakes like this:

t.m:4:10: warning: incompatible pointer types initializing 'NSSet *'
with an
expression of type 'NSArray *' [-Wincompatible-pointer-types]
NSSet *array = [[NSArray alloc] init];
^ ~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:
note:
instance method 'init' is assumed to return an instance of its
receiver
type ('NSArray *')
- (id)init;
^

It also means that we get decent type inference when writing code in
Objective-C++0x:

auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil];
// ^ now infers NSMutableArray* rather than id




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
ff676cb48fe8bf7be2feaa251dc7c5fb15af4730 08-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for all DeclaratorDecl's.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
d976c8e2752bc36c0697d43f985ec55b9450f8c1 02-Mar-2011 John McCall <rjmccall@apple.com> Work around a misdesigned GCC warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
d5313b0bbf3948fe7c63bf46a7da330c96d07309 02-Mar-2011 John McCall <rjmccall@apple.com> Provide an attribute, objc_method_family, to allow the inferred family
of an Objective-C method to be overridden on a case-by-case basis. This
is a higher-level tool than ns_returns_retained &c.; it lets users specify
that not only does a method have different retain/release semantics, but
that it semantically acts differently than one might assume from its name.
This in turn is quite useful to static analysis.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
85f3d76c0ecfdefcf83ea44a57b7a16119c8a045 02-Mar-2011 John McCall <rjmccall@apple.com> Move some of the logic about classifying Objective-C methods into
conventional categories into Basic and AST. Update the self-init checker
to use this logic; CFRefCountChecker is complicated enough that I didn't
want to touch it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
74b2756bc1f1f5f7c189996fe7e4cd3efef70263 04-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose when accessing property in a class method and
no property accessor class method to be found, instead of
crashing in IRGen. // rdar://8703553


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
26ac3f30ecef21749c00a4b1a08dd15d772dd5aa 02-Dec-2010 Douglas Gregor <dgregor@apple.com> Extend ExternalASTSource with the ability to lazily complete the
definition of an Objective-C class. Unlike with C/C++ classes, we
don't have a well-defined point in Sema where Objective-C classes are
checked for completeness, nor do we need to involve Sema when
completing a class. Therefore, we take the appropriate of having the
external AST source mark a particular Objective-C class as having an
external declaration; when using one of the accessors of an
Objective-C class that has an external declaration, we request that
the external AST source fill in the Objective-C class definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
a4ffd85a6684e42f900aad5459e58ad91bb88755 17-Nov-2010 Douglas Gregor <dgregor@apple.com> For an Objective-C @synthesize statement, e.g.,

@synthesize foo = _foo;

keep track of the location of the ivar ("_foo"). Teach libclang to
visit the ivar as a member reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3248854a5d16e1de17c58e05f726bdef9f042df2 30-Oct-2010 Chris Lattner <sabre@nondot.org> Rename alignof -> alignOf to avoid irritating C++'0x compilers,
PR8423


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
53b9441b5a81a24fa1f66f3f6416f1e36baa9c2f 01-Sep-2010 Ted Kremenek <kremenek@apple.com> Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols
(and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in
an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced
in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is
needed to maintain the lexical information of the original source.

Fixes <rdar://problem/8380046>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
000835d0b04345c0014c603fe6339b3bc154050e 23-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Support for IRGen of synthesize bitfield ivars in
objc-nonfragile-abi2 (radar 7824380).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
2c18bb7c9fca66c30b6eabbdcbc6399d24a54fa9 20-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> objective-c ivar refactoring patch. Iterations
over ivars for a varienty of puposes is now
consolidated into two small routines; DeepCollectObjCIvars
and ShallowCollectObjCIvars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
deacbdca554298ccdf636f19c6094a8825ec6b34 11-Aug-2010 Douglas Gregor <dgregor@apple.com> Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,
and create separate decl nodes for forward declarations and the
definition," which appears to be causing significant Objective-C
breakage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
74c730ad1f6818b676b0bad46d806a9176950328 09-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> - Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
ff331c15729f7d4439d253c97f4d60f2a7ffd0c6 25-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove the vast majority of the Destroy methods from the AST library,
since we aren't going to be calling them ever.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3fe104154dd2e8ffb351142d74f308938b5c99bf 22-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> atch for implementation of objective-c's -Wselector
warning flag in clang. Little more to do
for a PCH issue. Radar 6507158.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
ad51e74030a59a8aa4ef0ebca1d7a701602ef53b 17-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to synthesize property ivars on demand as
part of the new property synthesis by default.
wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
80aa1cd7973561889e51c1c152c8990a8de9c953 23-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to provide separate ASTs for multiple ObjC class extension
declarations (implements radar 7928731).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
83a230c83a54190366138c1a4f4310ef838b88fc 04-Jun-2010 John McCall <rjmccall@apple.com> Remember type source information for Objective C property declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
900fc6388e803868a34b9483510c345e9b49d7eb 17-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream.

The next step is to print the name directly into the stream, avoiding a temporary std::string copy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
7732cc9c0fdc97a2f8cce4e5933d8103213d1aef 08-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Implement method type encoding in the presense
of c-style arguments. Completes radar 7445205.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
27a961a6adab85cfcf7e48485bbec9237719ae96 02-Apr-2010 Daniel Dunbar <daniel@zuster.org> AST: Add ObjCIvarDecl::getContainingInterface().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
a06549226f45d5b72169a3d054415616dd1014a2 02-Apr-2010 Daniel Dunbar <daniel@zuster.org> Sema/Obj-C: Narrow type of ObjCIvarDecl::Create, and check additional invariants on the provided DeclContext.
- Doug, please see the FIXME in DeclObjC.cpp -- I am not sure what the right fix is.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
ebfa339321f8a4df9d5011e591a615d5765107d5 19-Mar-2010 Ted Kremenek <kremenek@apple.com> Make the CIndex API more resilient to being used on invalid code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
37cafb077ad5b170acae77e566638603011ef4c0 15-Mar-2010 Ted Kremenek <kremenek@apple.com> Move method FindPropertyVisibleInPrimaryClass() from ObjCContainerDecl to ObjCInterfaceDecl.
Also change this method to lookup property declarations using DeclContext::lookup().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
de09d0c9694f01a99870a8825266d44a29ebb325 15-Mar-2010 Ted Kremenek <kremenek@apple.com> Change ObjCCategoryDecl::FindPropertyDeclaration() to lookup
property decls using DeclContext::lookup().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
9f550ff05d496e6b9480e5619a21d9da0c9e27c1 15-Mar-2010 Ted Kremenek <kremenek@apple.com> Make 'findPropertyDecl()' a static method of ObjCPropertyDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
568eb6c87896db19dfb27b394669e05b8cbb27b3 11-Mar-2010 Ted Kremenek <kremenek@apple.com> Remove unused 'IVars' field from ObjCInterfaceDecl. That functionality
has migrated to DeclContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
4bc1cb6aa635a5bf8fae99bf69c56c724c1e786c 08-Mar-2010 Douglas Gregor <dgregor@apple.com> Keep track of type source information in the return type of an
Objective-C method declaration, e.g., for

- (Foo *)myMethod;

we now have TypeSourceInfo for the Foo*.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
0e5ad255729ee86b8ed57e659029008984517cde 23-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> More support for ivars in class extension.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
25760611365be23556b32332f8a66ae21ea93ecf 15-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Class continuation now has its own property ast for
those declared in it. This is to allow duplicate
property diagnostics for properties declared in class extensions
multiple times (radar 7629420) and for future use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
d0502407c1b41b2ace326f355d7b7a6876246223 21-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to implement rewriting of properties.
Fixes radar 7562952.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3db211b617c5073aa70eb25d37ed44ae0dca17c4 16-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve location information for Objective-C category declarations. We
previously only had a single location (the @ in @interface); now we
know where the @ is (for the start of the declaration), where the
class name is (that's the normal "location" now for diagnostics), and
where the category name is. Also, eliminated the redundant "end"
location, since ObjCContainerDecl already has better @end information.

The only XFAIL'd test is temporary; will un-XFAIL-it once I've taught
CIndex how to use the new locations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
18df52bbb5d28ca082064d31ae7558dbdae52377 16-Jan-2010 Douglas Gregor <dgregor@apple.com> Keep track of the source locations for each protocol reference in
Objective-C classes, protocol definitions, forward protocol
declarations, and categories. This information isn't actually used
yet; that's coming next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
a93c934af4fbf97cbe8e649d82e68ccacfe57c95 07-Dec-2009 John McCall <rjmccall@apple.com> DeclaratorInfo -> TypeSourceInfo. Makes an effort to rename associated variables,
but the results are imperfect.

For posterity, I did:

cat <<EOF > $cmdfile
s/DeclaratorInfo/TypeSourceInfo/g
s/DInfo/TInfo/g
s/TypeTypeSourceInfo/TypeSourceInfo/g
s/SourceTypeSourceInfo/TypeSourceInfo/g
EOF

find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \;
find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \;
find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
2dbdd622d02d1bfbe1e5bcf421b07b74c7a748f1 18-Nov-2009 Ted Kremenek <kremenek@apple.com> Add ObjCClassDecl::getSourceRange().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
321c22f1c4271c3d9a3d4d3fc18847f948ab595b 18-Nov-2009 Ted Kremenek <kremenek@apple.com> Add SourceLocations to ObjCClassDecl for the class identifiers referenced by @class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
a6f14e1a7ee3a9343a838297c73ca87fddb9ed4a 02-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Property declared in continuation class can only be used to
change a readonly property declared in the class (and its inherited protocols)
to writable property. (Fixes radar 7350645).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
0d69b8cc8e90a9364771837cb42d7031b4cbb984 29-Oct-2009 Steve Naroff <snaroff@apple.com> - Add/tweak some comments.
- change ObjCCategoryImplDecl::getCategoryClass() to getCategoryDecl().

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
b106fc635b1523952332131785b700453a936e49 05-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> tweaked my last patch to 1) preserve the protocol in
extension class's protocol list so its AST is complete.
2) Because of this no need to issue warning on unimplemeted
methods coming from the extended class protocols
because warning is issued when class definition is seen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
339798eae1eb61c50ca68766ed028c0a16d0a284 05-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to implement Protocols on class extensions.
<rdar://problem/7269631> Protocols on class extensions don't work



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
d789d3d985e28c9404e62157af46dcb7331920e0 02-Oct-2009 Steve Naroff <snaroff@apple.com> - Remove Sema::FindMethodInNestedImplementations().
- Add ObjCInterfaceDecl::lookupPrivateInstanceMethod().
- Convert clients.

No functionality change - One less method in Sema:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3a082d81006e7a2e01a6e431a22e21c78490ff8f 08-Sep-2009 Anders Carlsson <andersca@mac.com> Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
a1d5662d96465f0fddf8819d245da4d19b892eff 19-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces.

DeclaratorDecl contains a DeclaratorInfo* to keep type source info.
Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl.
EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo.

Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
0fd8904c5f71a11d29f67716c3ebdf7ad1c855fb 12-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to warn if a property which is 'assign' by default
may not implement NSCopying protocol in -fobjc-gc[-only] mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
e7f9d301a10b4b3223e91d9be4362b44cba0a212 28-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement ObjCMethodDecl::getCanonicalDecl().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
4292073a858f72769fa405b48390620c8932f8ae 28-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Add ObjCCategoryImplDecl::getCategoryClass() which returns the category interface decl.
-Correct ObjCMethodDecl::getNextRedeclaration(); A method in a ObjCCategoryImplDecl should point to
a method in the associated ObjCCategoryDecl, not the ObjCInterfaceDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
a8530375168f578e9039837c58054d55655c981b 28-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use ObjCImplDecl in place of ObjCCategoryImplDecl/ObjCImplementationDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
aecae629269fae3bf484baf1d109e9a89d14eead 27-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make ObjCImplDecl inherit from ObjCContainerDecl.

ObjCContainerDecl now is the root class for objc decls that contain methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
16f06bb41b1b02ff0847bc41b89818472053d672 26-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor ObjCImplDecl::getInstanceMethod/getClassMethod into one
ObjCImplDecl::getMethod.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
aa5420c1e36ab8e0e4bb87239d8b73a3a8ce75db 26-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor ObjCInterfaceDecl::lookupInstanceMethod/lookupClassMethod into one
ObjCInterfaceDecl::lookupMethod.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
094e2bb6730d63e0f6919e4839522a43b7644181 26-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor ObjCProtocolDecl::lookupInstanceMethod/lookupClassMethod into one
ObjCProtocolDecl::lookupMethod.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
467c0b165072689ef87fe8d9cd47a5b63485bcdc 26-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactor ObjCContainerDecl::getInstanceMethod/getClassMethod into one
ObjCContainerDecl::getMethod.

Avoids code duplication.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
98f2cca4b2731b5d43da7c1582dd443ecead658d 21-Jul-2009 Duncan Sands <baldrick@free.fr> Disambiguate an if statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
57ea6bee79cc60ba20c7886b453f40f380dce1b1 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement the virtual getNextRedeclaration() for ObjCMethodDecl.

If it's in an ObjCContainerDecl, its "redeclaration" is the method definition in the corresponding ObjCImplDecl.
If it's in an ObjCImplDecl, its "redeclaration" is the method in the interface.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
1cb35dd4840d21cec58648361180d5688446a9ca 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the ObjCCategoryImpls vector from Sema class.
Use ObjCInterfaceDecl::getCategoryClassMethod() and ObjCInterfaceDecl::getCategoryInstanceMethod() for the same functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
8a1d722f13df383600f36d77f842957c8adb5f1b 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> - Introduce ASTContext::getObjCImplementation() and ASTContext::setObjCImplementation() which use a DenseMap to associate
an interface/category with its implementation (if one exists).

- Introduce ObjCInterfaceDecl::get/setImplementation() and ObjCCategoryDecl::get/setImplementation() that use the above methods.

- Add a compiler error for when a category is reimplemented.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
14108da7f7fc059772711e4ffee1322a27b152a7 11-Jul-2009 Steve Naroff <snaroff@apple.com> This patch includes a conceptually simple, but very intrusive/pervasive change.

The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.

This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.

By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time.

Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
17945a0f64fe03ff6ec0c2146005a87636e3ac12 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> De-ASTContext-ify DeclContext.

Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
8019a7b55086da1b99dd156567d1f8c7e773d225 06-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Adds synthesize ivars to DeclContext.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
496b5a894c5ec5425de53909f5aac3fb4771a2ec 05-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Use of DeclContext for objc's ivars. No functionality
change. More to follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
cd1876207f5564beba74e4b2524b664bdba0ba9f 22-May-2009 Fariborz Jahanian <fjahanian@apple.com> (Next runtime only) check to see if class implements forwardInvocation method
and objects of this class are derived from 'NSProxy'.
Under such conditions, which means that every method possible is
implemented in the class, we should not issue "Method definition not found"
warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
8f36aba016c2d236a90f9ecf0a66904209202202 23-Apr-2009 Douglas Gregor <dgregor@apple.com> The ivars in an ObjCImplementationDecl are now stored in the
DeclContext rather than in a separate list. This makes PCH
(de-)serialization trivial, so that ivars can be loaded lazily.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
2c2d43c557beca1b4ba4bd743f33978aecb46a97 23-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH (de-)serialization for ObjCImplDecl. This can't be tested yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
653f1b1bf293a9bd96fd4dd6372e779cc7af1597 23-Apr-2009 Douglas Gregor <dgregor@apple.com> Eliminate the three SmallVectors in ObjCImplDecl (for instance
methods, class methods, and property implementations) and instead
place all of these entities into the DeclContext.

This eliminates more linear walks when looking for class or instance
methods and should make PCH (de-)serialization of ObjCDecls trivial
(and lazy).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
a24357887dc2e6971fb84286be4484953565dc4d 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove lookupFieldDeclFromIvar from ObjCIvarDecl interface.
- This is only used by CGObjCRuntime now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
d4ae6c038ea8dd2faaadd1f9da725ec37b4f7ef9 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Revert r69771, I missed some (obvious) details. :/


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3b3a45858c6b2a45114e91902c3bf3c4b7f5f302 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Mark another TypeForDecl const and make getObjCInterfaceType's argument const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
0c45793173ebdf15ba7345a1f71919c47abbeed0 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Rework the shadow struct that is layed out for Objective-C classes.

- Superclasses are now always laid out their shadow structure at the
first field.

- Prior to this, the entire class heirarchy was flattened into a
single structure which meant that alignment, padding, and bitfields
weren't packed correctly (the ASTRecordLayout was correct however,
which meant our debug info didn't coincide with ivar offsets, for
example).

- This is still very suboptimal, but I believe the ivar layout itself
is now at least close to correct.

- <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding
backwards


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
24c8991f4dd0ab86678b5ab11f05586687b55be9 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make sure to mark the interface as completed when we see an
@implementation that closes a @class delcaration.
- I don't know how to make a test case for this, but this strengthens
the invariants that hold internally. The functionality change here
is the edit to SemaDeclObjC.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
53c9d8a4b8f0a76cb9dd2fdd8c433ccf110f2eec 20-Apr-2009 Steve Naroff <snaroff@apple.com> Add pch reader/writer support for ObjCMethodDecl.

Test will be enabled with ObjCInterfaceDecl is added.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
60952f94cf67ddb566600434857cad7a48264c3b 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove non-const form of lookupFieldDeclForIvar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
6ab3524f72a6e64aa04973fa9433b5559abb3525 09-Apr-2009 Douglas Gregor <dgregor@apple.com> Propagate the ASTContext to various AST traversal and lookup functions.
No functionality change (really).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
d09a456e466597fe1667ea5e757bfe53be2cba7d 02-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Fix up lookup rules for properties declared in
objc's continuation class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
22b6e0682d69173b4282853aded2f9253f3e2c15 02-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a bug in declaration of property in continuation
class which was exposed by implementation of
objc2's nonfragile abi code gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
99eee3675e830ff367ae1fe35ce19fb49e7e4114 01-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Nonfragile ivar synthesis with property is in a continuation
class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
d13d30258647e20c55a3910e4969f4a47bb2802c 31-Mar-2009 Chris Lattner <sabre@nondot.org> simplify some casting


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
af3e72285238369c2ea4ebd40a1c9a87bd3eabb7 31-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> fe support for objc2's nonfragile-abi synthesized ivars.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68077 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
91b0b0cf6b537cbcbca0038c7032f87161a41d31 01-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6619539> incompatible pointer types sending 'XCElementSpacer *', expected 'XCElement *' (not handling protocol signatures correctly?).

- Reworked ASTContext::canAssignObjCInterfaces().
- Added ObjCProtocolDecl::lookupProtocolNamed().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3aa1861bd8b5121e53379b1a00f9d6ad8dead4f6 28-Feb-2009 Chris Lattner <sabre@nondot.org> "This patch addresses two FIXME on ObjCCategoryImplDecl:

/// FIXME: Like ObjCImplementationDecl, this should not be a NamedDecl!
/// FIXME: Introduce a new common base class for ObjCImplementationDecl and ObjCCategoryImplDecl

It adds an IndentifierInfo ivar to the ObjCCategoryImplDecl, so it can inherits from Decl and not NamedDecl (I'm not sure about the memory management of this ivar).

And now that both ObjCImplementationDecl and ObjCCategoryImplDecl have the same super classes, it allow creation of a common base class: ObjCImplDecl"

Patch by Jean-Daniel Dupas!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
b558422a49dbf97d560e493fb1573d44f0abe221 26-Feb-2009 Steve Naroff <snaroff@apple.com> Fix ObjCInterfaceDecl::lookupInstanceMethod()/lookupClassMethod() to search in inherited protocols.

Also changed ObjCInterfaceDecl::lookupClassMethod() to look through a categories protocols.

Test/patch submitted by Jean-Daniel Dupas (thanks!).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
0de21fd85d79bccd32f04256f5b3328ab5ed7c95 22-Feb-2009 Steve Naroff <snaroff@apple.com> Contains the following (related to problems found while investigting <rdar://problem/6497631> Message lookup is sometimes different than gcc's).

- Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default).
- Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol).
- Changed several test cases to jive with the above changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
4ee413ba81c8030c195a9166847928054ed01ca4 20-Feb-2009 Chris Lattner <sabre@nondot.org> allocate and dellocate objc decl list through AST Context instead of
with new/delete. With disable-free, this reduces the number of 4/8 byte
mallocs from 4793/1541 to 865/456 and also drops other sizes as well.

This is a very small perf win, nothing major.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
38af2deb27cdfa1a95bde96e30dab15dce53fcef 20-Feb-2009 Chris Lattner <sabre@nondot.org> add plumbing to get ASTContext& down to allocation/deallocation points in ObjCList,
but don't start using it yet. Renamed some methods to be more consistent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
11e1e1af2641affb378080a4f3d1a30da1cad082 20-Feb-2009 Chris Lattner <sabre@nondot.org> newly factored, we can now move the set and destroy methods out of line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
88cf7a16902a9189d16653e1061cfda333187b58 20-Feb-2009 Chris Lattner <sabre@nondot.org> rename ObjCList::clear() -> ObjCList::Destroy(). Require that destroy is called
before the dtor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
ab35163a5b80bf1bd49f0eebb708970f2b0e04e9 20-Feb-2009 Chris Lattner <sabre@nondot.org> rearrange the contents of DeclObjC to be by-class. Fix some 80 column issues
and other non-semantic changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
077e0f09d12a4bd61908863df35528de1cd80c53 20-Feb-2009 Chris Lattner <sabre@nondot.org> destroy should forward to base class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65151 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
7a21bd046fe57629ab074980cf8193f5e0c15735 20-Feb-2009 Chris Lattner <sabre@nondot.org> move the @implementation ivar list to being an ObjCList, which prevents
it from being leaked, among other things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
cafeb35117578585dbbfef0bc79d8aa27712bc0e 20-Feb-2009 Chris Lattner <sabre@nondot.org> remove some slow O(n) methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
07fa7749da805969f2ed467a4eb5b405a4ff9a23 20-Feb-2009 Chris Lattner <sabre@nondot.org> Change ObjCForwardProtocolDecl to use an ObjCList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
67956052ea5fb0cd7f443de96a11f9a0176dc681 20-Feb-2009 Chris Lattner <sabre@nondot.org> move the interace list of @class to use ObjCList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
4a323d94e50c8f570cbfaf0392e68215b8ca87bf 20-Feb-2009 Chris Lattner <sabre@nondot.org> remove a dead list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
2073216a1075767b5d25c23d1462b7034686d94d 20-Feb-2009 Chris Lattner <sabre@nondot.org> switch ObjCMethodDecl's parameter list from being explicitly managed to an ObjCList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
e881483a3bc22ffad62367501aa09ad8508fe363 20-Feb-2009 Chris Lattner <sabre@nondot.org> switch the interface ivar list from being explicitly managed to using ObjCList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
0b7ebb3dba0df0a6cbf221e5edbc6a4b8848478c 20-Feb-2009 Chris Lattner <sabre@nondot.org> move more objc destruction out of dtors into Destroy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
411280e5b25ba7dcd7c8a82a5c23880fe7632a3c 20-Feb-2009 Chris Lattner <sabre@nondot.org> move some objc decl destruction out of dtors into Destroy method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
0c00aac5d618f39afc406c5b2e07642930af1d56 17-Feb-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> All Decls have a DeclContext now, hooray! Fans of consistency rejoice.

Pass the DeclContext to ObjCIvarDecls as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
a5afdd0ef9ff4a7a3f26145b6536a84dd340c897 16-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Remove FindIvarDeclaration. Use lookupInstanceVariable is is functionally
the same.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
d6eed1cb06016d2e41f9dba4b794f52696415eec 16-Feb-2009 Chris Lattner <sabre@nondot.org> wrap long lines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3e9704981d7691fdd44913bf1786e8d760d8a627 27-Jan-2009 Steve Naroff <snaroff@apple.com> Remove many references to ASTContext::getAllocator(), replacing them with calls to the recently added placement new (which uses ASTContext's allocator for memory). Also added ASTContext::Deallocate().

This will simplify runtime replacement of ASTContext's allocator. Keeping the allocator private (and removing getAllocator() entirely) is also goodness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
4afa39deaa245592977136d367251ee2c173dd8d 20-Jan-2009 Douglas Gregor <dgregor@apple.com> Remove ScopedDecl, collapsing all of its functionality into Decl, so
that every declaration lives inside a DeclContext.

Moved several things that don't have names but were ScopedDecls (and,
therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
store empty DeclarationNames for these things, nor do we try to insert
them into DeclContext's lookup structure.

The serialization tests are temporarily disabled. We'll re-enable them
once we've sorted out the remaining ownership/serialiazation issues
between DeclContexts and TranslationUnion, DeclGroups, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
f034e9cc4dad81d8fe6eb88a84da55b2909a9cdd 19-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to allow @dynamic synthesis of property in a category,
with @synthesize being illegal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
ee49d0496bb8ff2bbf479bb7fbcfbdc71eed7461 12-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix crasher due to use-after-release: DeclContext now owns all ObjCMethodDecls, and shouldn't be released elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
d1fa6449e9dbdd667466e9e1e971aa17c9793e8a 12-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to supprt case of readonly property being
assigned to when it has user declared setter method
defined in the class implementation (but no declaration in
the class itself).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
93983f8fa120330bf212bfde7e65da2709fb3be8 11-Jan-2009 Steve Naroff <snaroff@apple.com> Convert property implementation to DeclContext::addDecl().
This completes the ObjCContainerDecl AST cleanup (for now).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
6327e0d55c590b3c2766fa76ef1db241a0467df2 11-Jan-2009 Steve Naroff <snaroff@apple.com> A few property related cleanups to ObjCContainerDecl AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
212921261b9904d5b21c85c68a57c2b0d3f72b14 10-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Explicit declaration of property setters over-ride
prohibition of 'readonly' properties in an assignment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
a66793ee8d2589ead81739d9b8a968650db3d452 09-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> This patch removes mergeProperties and does the property lookup
in designated protocols lazily.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
f8d49f64ef6ab7e632717a31631fc289aab69428 09-Jan-2009 Douglas Gregor <dgregor@apple.com> Provide a new kind of iterator, the specific_decl_iterator, that
filters the decls seen by decl_iterator with two criteria: the dynamic
type of the declaration and a run-time predicate described by a member
function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl
considerably. It has no measurable performance impact.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
09c4719788a5cea09897525e528fa00420f1677b 09-Jan-2009 Steve Naroff <snaroff@apple.com> Move property API's up to ObjCContainerDecl (removing a lot of duplicate code).
Add isa/cast/dyncast support for ObjCContainerDecl.
Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing).
More simplifications to Sema::ActOnAtEnd()...
Added/changed some FIXME's as a result of the above work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
84efc04f41b9760f339717834373db19a74c14fe 09-Jan-2009 Daniel Dunbar <daniel@zuster.org> Fix crash on null deference when searching for readwrite properties in
categories.
- Also, simplify nesting via early return.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
d04341000d35c8808a72838b057eed7bf13b7661 09-Jan-2009 Douglas Gregor <dgregor@apple.com> Addressed the issue in <rdar://problem/6479085>, where we failed to
rewrite @class declarations that showed up within linkage
specifications because those @class declarations never made it any
place where the rewriter could find them.

Moved all of the ObjC*Decl nodes over to ScopedDecls, so that they can
live in the appropriate top-level or transparent DeclContext near the
top level, e.g., TranslationUnitDecl or LinkageSpecDecl. Objective-C
declarations now show up in a traversal of the declarations in a
DeclContext (they didn't before!). This way, the rewriter finds all
Objective-C declarations within linkage specifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
6321c0aaa3523f3d569d5fbe5820b3fa250e2585 08-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix ObjCInterfaceDecl::Destroy and ObjCProtocolDecl::Destroy to iterate and destroy all contained ObjCMethodDecls in one sweep. This fixes a use-after-free error found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
92f863bffa9d5efe5cc63992e06b268231bc2cc0 08-Jan-2009 Steve Naroff <snaroff@apple.com> Removed ObjCContainerDecl::getPropertyMethods()...doesn't belong in the AST.
Moved logic to Sema::ProcessPropertyDecl().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3e0a540b6d846178857289ec0eb8470a278d11a3 08-Jan-2009 Steve Naroff <snaroff@apple.com> Remove redundant method context (now that ObjCMethodDecl isa ScopedDecl).
Convert clients to use the standard getDeclContext() API.

Doug, thanks for the review!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
0701bbb228dfd87e1fe82a0a4b7b9facfecb43da 08-Jan-2009 Steve Naroff <snaroff@apple.com> This is a large/messy diff that unifies the ObjC AST's with DeclContext.

- ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts.
- ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext).
- ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-)
- Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective.
- Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch().
- Simplified Sema::ActOnAtEnd() considerably. Still more work to do.
- Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl.
- Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl.

This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
e4f039e01e797a38bc97bf22aff9832ecd18ff5f 07-Jan-2009 Steve Naroff <snaroff@apple.com> ObjC AST cleanups/simplifications (phase 1).
Add ObjCContainerDecl class and have ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl inherit from it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
669e8d3c6a89c1ff45500d36dde7011b3cf7af7c 22-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Fixed a bug showed up the meta-data for protocol
instance methods by building print-class-info.m,
whose output is now identical to what gcc puts out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
d8df6823420c22329a2a9aacd2a440368d38d86c 18-Dec-2008 Steve Naroff <snaroff@apple.com> Fix http://llvm.org/bugs/show_bug.cgi?id=3189.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
a769c004a2874504c17ea8afccbc4ad35fc33c9f 17-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> This patch will build the Records lazily per Steve's comments.
Note that one test duplicate-ivar-check.m will fail because I
need to re-implement duplicate ivar checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
c9ca4a23b1d2a2d923b283e7022a39c7aa5e87b2 17-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Added comment to Steve's patch to clarify the case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
7d1117d93cb6cc57db6157478f02ebc0f0a1060c 17-Dec-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6450964> clang on xcode: Assertion failed: (RecordForDecl && "lookupFieldDeclForIvar no storage for class").

This was a recent regression caused by r61043 (related to code gen. for ivar references).

Fariborz, please review. I have some other concerns related to code generation for ivars that we can discuss later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3281eff4c1fbf7e2e59cc5381d5270deaf06839e 16-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Diagnose that ivars in current and super class may not
be duplicates and a test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
9ee92e84ecf085ccbe6f877d1c6e1500961bbbce 15-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Name of addLayoutToClass is confusing as no layout calculation
is done. Layout is calculated lazily at code gen type.
This patch changes the name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
fd64bb635dc221baa19f81d5d2a084f7eb269f7f 15-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Code gen. for ivar references; including bitfield
ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
9fbb609b90c1b41e147cf3e6afac40ff4b4137da 15-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Removed setRecordForDecl. Added a FIXME.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
aaa63a761c6671a08e3f4f463435b72739fa194b 13-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Patch for ObjCIvarRefExpr containing the field
matching the storage layout for this ivar


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
60f8c868ffb346b78451a3eccaecd0461d2ae498 13-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Add storage layout to ObjC classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
44b4321feab46299d3f5cfd404680884752a0fcf 11-Dec-2008 Douglas Gregor <dgregor@apple.com> Unifies the name-lookup mechanisms used in various parts of the AST
and separates lexical name lookup from qualified name lookup. In
particular:
* Make DeclContext the central data structure for storing and
looking up declarations within existing declarations, e.g., members
of structs/unions/classes, enumerators in C++0x enums, members of
C++ namespaces, and (later) members of Objective-C
interfaces/implementations. DeclContext uses a lazily-constructed
data structure optimized for fast lookup (array for small contexts,
hash table for larger contexts).

* Implement C++ qualified name lookup in terms of lookup into
DeclContext.

* Implement C++ unqualified name lookup in terms of
qualified+unqualified name lookup (since unqualified lookup is not
purely lexical in C++!)

* Limit the use of the chains of declarations stored in
IdentifierInfo to those names declared lexically.

* Eliminate CXXFieldDecl, collapsing its behavior into
FieldDecl. (FieldDecl is now a ScopedDecl).

* Make RecordDecl into a DeclContext and eliminates its
Members/NumMembers fields (since one can just iterate through the
DeclContext to get the fields).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
91b51a92f2e9fc8025b6a9df88442840eb62823a 09-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Prevent bogus warning on unimplemented setter/getter when user
has added declaration of these methods in its @interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
fef30b55230064d334a669a065a1c9acdb87cdfe 09-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Support for implementation of property in the case where
the synthesis is in an implementation of s subclass of
a super class where the property has been declared.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
b79c01ea321687d8b9e82968395f30c5c261a6b0 08-Dec-2008 Steve Naroff <snaroff@apple.com> ObjCInterfaceDecl::lookupInstanceMethod() needs to look through a categories protocols.

Fixes <rdar://problem/6418640> clang on prokit: error: incompatible type returning 'id', expected 'NSSize'



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
1ac2bc44781ec8451f880dcf586768a71824d3a6 07-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Use of properties declared in protocols in the category
via the category's protocol list1s, with appropriate
diagnsostics and a test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
9482a4f0feca4bc9eb7c6ad36e21cbf7365f5359 05-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Fixed a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
ae6f6fd1527a1da84679a6f0439dec3bbbd6ca7b 05-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> This test checks for duplicate implementation of the same
property. It also checks for duplicate use of the same ivar
in two different iproperty implementations. It also caught
an error for a test case used in CodeGen :).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
b85cce6498c8c1c20f701571d85a3b2fe53338eb 02-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> This patch corrects problem in searching for a setter/getter method for
a property. Previous scheme of seaching in interface's list of methods
would not work because this list is not yet constructed. This is in preparation
for doing semantic check on viability of setter/getter method declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
31afbf02a381ae9c77d225aa54f972d152838b3a 25-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Refactored checking on readonly property into a method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
8ec03f58c33c33a917f54bb7f2cd61b6d7ffe0ca 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it
assert if the name is not an identifier. Update callers to do the right
thing and avoid this method in unsafe cases. This also fixes an objc
warning that was missing a space, and migrates a couple more to taking
IdentifierInfo and QualTypes instead of std::strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
077bf5e2f48acfa9e7d69429b6e4ba86ea14896d 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename Selector::getName() to Selector::getAsString(), and add
a new NamedDecl::getAsString() method.

Change uses of Selector::getName() to just pass in a Selector
where possible (e.g. to diagnostics) instead of going through
an std::string.

This also adds new formatters for objcinstance and objcclass
as described in the dox.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
2e1cd4264d363ca869bf37ef160902f211d21b8c 17-Nov-2008 Douglas Gregor <dgregor@apple.com> Introduction the DeclarationName class, as a single, general method of
representing the names of declarations in the C family of
languages. DeclarationName is used in NamedDecl to store the name of
the declaration (naturally), and ObjCMethodDecl is now a NamedDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
e86d923f18be15ff8367f180c1d2722eed2e9716 27-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix "possibly uninitialized" warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
7b4732296b5c7e1a53021a8dbb97f39dedbd961f 27-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add addPropertyMethods implementations for
ObjC{Category,Protocol}Decl.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
394d33f1f602f7681032a659dff5bb09061ee510 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add ObjCPropertyDecl::isReadOnly.

Respect isReadOnly when generating synthesized method decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3216dcdebb8ae0f2993ac5f5249caa217444bacf 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> constify ObjC*::getClassMethod,getInstanceMethod

No (intended) functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
08a356cc2b98cff990ef6969e819a214443d7f8f 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Missed a file; part of:

Move implicit Obj-C param creation into ObjCMethodDecl.
- Add ObjCMethodDecl::createImplicitParams.
- Remove ObjCMethodDecl::set{Self,Cmd}Decl
- Remove Sema::CreateImplicitParameter

No (intended) functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
9f0afd4e79601d9982072ff9318e6f9a982c770e 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Rename ObjCPropertyImplDecl::PropertyImplKind (consistency)
- Change enum name to Kind.
- Change enum constants to English strings.

Also, fix getPropertyImplementation (which probably should be renamed)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
5fa63312cfc9a6cd2ea688eaea90ca534aeb8c0e 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix return type for setter method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
4d7da2f4a39adcc2ea211fb30600fabde4f3a0b1 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Synthesize property setter method as we do for getter.
- Also, fix Parser to construct proper SetterName selector (should be
lifted out of parser though).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
f6414927e67e27d9324d8d179c5f7ea620443924 20-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix attributes on Obj-C interfaces & methods.
- Drop MethodAttrs parameter to ObjCMethodDecl
- Call ProcessDeclAttributeList for interface & method decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
01e6779faca1e3a3164c697d6e2dfee0881a6981 20-Aug-2008 Ted Kremenek <kremenek@apple.com> Added ObjCAtDefsFieldDecl to represent FieldDecls created by @defs.
This fixes an ownership issue where FieldDecls could be owned both by an ObjCInterfaceDecl and a RecordDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
e91593ef084479340582b2ba177b44be50a717b7 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and
SourceLocation.h)
- Move ASTContext constructor into implementation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
b8db21d4df5fbb6ce1ace6411b82d3d623d789de 23-Jul-2008 Ted Kremenek <kremenek@apple.com> When constructing an ObjCIvarDecl object in Sema, provide its visibility up front instead of setting it afterwards.
This change also fixes a subtle bug where the access control of an ivar would be initialized to garbage if we didn't have an explicit visibility specifier (e.g., @private).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
780f329cb011bff0da5763e2e9744eec093d0509 21-Jul-2008 Chris Lattner <sabre@nondot.org> move two more lists of protocols over to use ObjCList<ObjCProtocolDecl>,
simplifying code along the way and fixing a problem and memory leak or two.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3db6cae19c236fe2cef343c90105ce7cca7de965 21-Jul-2008 Chris Lattner <sabre@nondot.org> introduce a new ObjCList templated class and start moving
various objc lists over to it. First up, the protocol list
on ObjCInterfaceDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
f7b2c98c16dfb2261ea57d40a1d5bc4738e73175 21-Jul-2008 Chris Lattner <sabre@nondot.org> rename setReferencedProtocolList -> addReferencedProtocols to
be consistent with ObjCInterfaceDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
b752f289026ad8e5f44851b20e009a27ed61eefc 21-Jul-2008 Chris Lattner <sabre@nondot.org> Switch initialization of the protocol list for an interface decl to use
the standard "set these as the list of protocols" interface instead of a
strange "set this as the size and then set each one to the value" interface.
The problem with the later is that it a) is completely different from
everything else, b) is awkward, and c) doesn't handle the case when a
referenced protocol is invalid: it set it to null.

This meant that all clients downstream would have to handle null protocols
in the protocol list, and empirically they didn't. Fix this by not setting
invalid protocols in the referenced protocol list, fixing the crash on
test/Sema/objc-interface-1.m

While I'm at it, clean up some locations so that we produce:

t.m:1:25: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
~~~~~~~~~~~~~~~~~~~~~ ^

instead of:

t.m:1:1: error: cannot find interface declaration for 'NSObject', superclass of 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
8f3b2654a9ff6912862f366102f5c46f7757260a 16-Jul-2008 Steve Naroff <snaroff@apple.com> Two fixes:
- Make sure ObjCIvarDecl propagates the bitfield width.
- RewriteObjC::SynthesizeIvarOffsetComputation(): Avoid using the __OFFSETOF__ mumbo jumbo for bitfields (since it isn't legal C). This fixes <rdar://problem/5986079> clang ObjC rewriter: bitfields and ivar access don't mix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
05ac3ef08f9d06e0a4439073c9edabf7f912f946 06-Jun-2008 Ted Kremenek <kremenek@apple.com> Reclaim memory owned by ObjCForwardProtocolDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
400d95fb7bb9fac609f8613862b84f3a2a7d510f 06-Jun-2008 Ted Kremenek <kremenek@apple.com> Implement "Destroy" and destructor for ObjCClassDecl, allowing us to reclaim its memory and the memory of the Decls it owns.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
1c8a413c1e00636c77666ddf1e3b0311f3fa8c81 06-Jun-2008 Ted Kremenek <kremenek@apple.com> Implement "Destroy" and destructor for ObjCProtocolDecl, allowing us to reclaim its memory and the memory of the Decls it owns.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
1a726d7cbf62ab13949743e9ef8c0670dd862e46 06-Jun-2008 Ted Kremenek <kremenek@apple.com> Because of a lack of a clear ownership role between ObjCInterfaceDecls and
ObjCPropertyDecls, have TranslationUnit destroy ObjCPropertyDecls. This is a
horrible hack, and must be removed eventually.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
8a779314870760848e61da2c428a78971fe3f1c3 06-Jun-2008 Ted Kremenek <kremenek@apple.com> Initial work on additional memory collection for ObjC AST objects. We now
have Destroy methods of ObjcMethodDecl and ObjCInterfaceDecl which recursively
destroy their owned Decls and Stmts. There are a few cases where it is not
clear what to do (FIXMEs included in the patch).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
3d2c22b1d334fa74d26a5f21841cb55df5dfdd1a 05-Jun-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/5987482> clang on xcode: null dereference in Sema::ActOnMemberReferenceExpr.

In addition to fixing the crasher, this commit fixes further improves property lookup (by searching protocols of qualified interfaces..."NSObject <prot>").


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
6c930f2ac0af05a120a39cb780b50d4a293abdfc 04-Jun-2008 Steve Naroff <snaroff@apple.com> Make sure we look through categories when searching for a classes property.

Fixes <rdar://problem/5984338> clang on xcode: property implementation must have its declaration in interface 'PBXOpenQuicklyModule'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
6b3502c5c3eba1d3da40c4c78b31f4d8cffec051 10-May-2008 Nuno Lopes <nunoplopes@sapo.pt> 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
/external/clang/lib/AST/DeclObjC.cpp
4607034e621aa77378ec75249d1e9eaf5de49b6a 07-May-2008 Fariborz Jahanian <fjahanian@apple.com> 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
/external/clang/lib/AST/DeclObjC.cpp
33de3f0333ca0b5274291b8d76c86758c0484691 07-May-2008 Fariborz Jahanian <fjahanian@apple.com> 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
/external/clang/lib/AST/DeclObjC.cpp
46b55e56d029aec699fc2701e43d70264da9ecd8 05-May-2008 Fariborz Jahanian <fjahanian@apple.com> 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
/external/clang/lib/AST/DeclObjC.cpp
aebf0cba02c014ac8b19d615c654248e0e93779f 02-May-2008 Fariborz Jahanian <fjahanian@apple.com> 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
/external/clang/lib/AST/DeclObjC.cpp
628b96f34e93b643b6e15e75eabb8d96079a7e27 23-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> 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
/external/clang/lib/AST/DeclObjC.cpp
c70bee863b6f800d7c88f409e89dc85ed867ef64 22-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> 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
/external/clang/lib/AST/DeclObjC.cpp
559c0c4bbecc017aab0716d546c4fefbcc194687 21-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> 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
/external/clang/lib/AST/DeclObjC.cpp
3dd4ba4068e953125b95ce85c723322cdd0a3cb5 17-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> 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
/external/clang/lib/AST/DeclObjC.cpp
d9a3c330b02c52630014dc26fc009236facf8227 16-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Fixed a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
7e7e3872b584bc5e7de7a34c8b9c092032303b72 16-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> 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
/external/clang/lib/AST/DeclObjC.cpp
1de1e74541c25c1a7b721f1c3991ea34c8403420 15-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> 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
/external/clang/lib/AST/DeclObjC.cpp
dae1a1a2aa4f245b1958dc8db6089f24c575ef13 12-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> AST generation for objc2's property declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
d6a07aaf62b40cdfbd96f6b874d02b06fc22d015 11-Apr-2008 Steve Naroff <snaroff@apple.com> 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
/external/clang/lib/AST/DeclObjC.cpp
5619688510185081cbb4621d703daf7ee24cf39a 06-Apr-2008 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/AST/DeclObjC.cpp
b048c9835969c4f7fe06264748be18ed4b442116 06-Apr-2008 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/AST/DeclObjC.cpp
e0def7589a8afa8a6acef13476bb3f882c104b91 06-Apr-2008 Chris Lattner <sabre@nondot.org> fix a number of const qualification bugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
0ed844b04ea4387caa4e1cf3dc375d269657536b 04-Apr-2008 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/AST/DeclObjC.cpp
f4af5154571e0c5eadb19df10e65464766ef6683 17-Mar-2008 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/AST/DeclObjC.cpp
55d13b4d5530a14d5baa72adab32ae78ba256caf 16-Mar-2008 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/AST/DeclObjC.cpp
f8d17a59167d9c2026506ed8813ea434d93b662a 16-Mar-2008 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/AST/DeclObjC.cpp
75c9cae5f85c72cbb1649e93849e16ede3f07522 16-Mar-2008 Chris Lattner <sabre@nondot.org> add two more Create methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
68c82cf61228102aba1194efef222fa1478af2a8 16-Mar-2008 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/AST/DeclObjC.cpp
61f9d41036e30ff80130f99b31c0626e3ef057cc 16-Mar-2008 Chris Lattner <sabre@nondot.org> Add create methods for ObjCCategoryDecl, ObjCForwardProtocolDecl, ObjCClassDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
c858105d41602a2dadb2efbc1af80a7b791ebac3 16-Mar-2008 Chris Lattner <sabre@nondot.org> minor cleanups, make getNumInstanceMethods always return unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
cca59d77c4b84fd2da268018dbaf9431a621e75b 16-Mar-2008 Chris Lattner <sabre@nondot.org> Give ObjCProtocolDecl a Create method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
0e77ba0bf769e2e5a4a93c079f241b02aeb3ef93 16-Mar-2008 Chris Lattner <sabre@nondot.org> Add create methods for ObjCIvarDecl and ObjCInterfaceDecl


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
b06fa3b86951b9f179c99c3768331536c32e902d 16-Mar-2008 Chris Lattner <sabre@nondot.org> remove some dead arguments to ObjCMethodDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
6c4ae5de0c356777446f823b573821fb95560d91 16-Mar-2008 Chris Lattner <sabre@nondot.org> Give ObjCMethodDecl a Create method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/AST/DeclObjC.cpp
1e03a561f4bd96910cb31a8af53a6ad321a12b51 16-Mar-2008 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/AST/DeclObjC.cpp