History log of /external/clang/lib/Sema/SemaDeclObjC.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a4de17562d13d7a8188108243c4cfbd52f33229a 04-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r256229

http://b/26987366

(cherry picked from commit 87d948ecccffea9e9e37d0d053b246e2d6d6c47b)

Change-Id: I10ca401a280e905253aafabad9118693a2f24ffb
/external/clang/lib/Sema/SemaDeclObjC.cpp
b6d6993e6e6d3daf4d9876794254d20a134e37c2 01-Jul-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r239765

Change-Id: I0393bcc952590a7226af8c4b58534a8ee5fd2d99
/external/clang/lib/Sema/SemaDeclObjC.cpp
58878f85ab89b13e9eea4af3ccf055e42c557bc8 06-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r235153

Change-Id: Ia94bbcb6da7c75b6e7c2afedd1001094d62a7324
/external/clang/lib/Sema/SemaDeclObjC.cpp
3ea9e33ea25e0c2b12db56418ba3f994eb662c04 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r233350

Change-Id: I12d4823f10bc9e445b8b86e7721b71f98d1df442
/external/clang/lib/Sema/SemaDeclObjC.cpp
0e2c34f92f00628d48968dfea096d36381f494cb 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master clang for rebase to r230699.

Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/lib/Sema/SemaDeclObjC.cpp
176edba5311f6eff0cad2631449885ddf4fbc9ea 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master Clang for rebase to r222490.

Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/Sema/SemaDeclObjC.cpp
c568f1e98938584c0ef0b12ae5018ff7d90a4072 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/Sema/SemaDeclObjC.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

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

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Sema/SemaDeclObjC.cpp
4417498c9f31829c1c2e0b0a99db13420e988746 15-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC. Fixes a bogus warning of unused backing
ivar when property belongs to a super class and
currnt class happens to have a method with same name as
property. // rdar//15473432


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
2b61039ceb9162e7b47ed4cb92b957c8a7668da1 05-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC. Method implementations should only check for
"Missing call to Super" in the overriding method and
not in the method itself. // rdar://15385981.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
7dcff5b56bc470c456f70ecb124c3a9013c50953 14-Oct-2013 Benjamin Kramer <benny.kra@googlemail.com> Reduce double set lookups by using the result of insert.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
a924f847fcc3268ca2ce5c1bc5592a3774aeab80 25-Sep-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC: Handle the case of qualifying protocols
declared in a typedef declaraton used as super
class of an ObjC class. Curretnly, these protocols
are dropped from the class hierarchy. Test shows that
it is now included. // rdar://15051465


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
2330df43c89dfbcf888a1b0d608f71546f29b6cf 24-Sep-2013 Fariborz Jahanian <fjahanian@apple.com> Revert my patch in r191155 to allow forward
class/protocol decls in @implementation and
fixup modern rewriter to handle that.
// rdar://15066233


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
44242396a3cf647f4f45058856c7e751df1d9a6e 22-Sep-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC: ObjC declarations, including forward class
and protocols can be at global scope only.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
18062394db459158942ab491a88b9d52a5c0ab0d 27-Aug-2013 Serge Pavlov <sepavloff@gmail.com> Cleanup of OpaquePtr. No functionality changes.
- Some documenation were added.
- Usages of OpaquePtr<A>.getAsVal<A>() were replaced by OpaquePtr<A>.get().
- Methods getAs and getAsVal were renamed to getPtrTo and getPtrAs respectively.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
2d67097ad41f4c2fe82ebce3f587e06498f1bd71 17-Aug-2013 Richard Smith <richard-llvm@metafoo.co.uk> Refactor all diagnosing of TypoCorrections through a common function, in
preparation for teaching this function how to diagnose a correction that
includes importing a module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
41594c5489f783a8398c68da72abb87434cd5634 15-Aug-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC [Sema]. This patch makes sure that all inherited
properties (direct or indirect) setter/getter (or declared
methods as well) are seen by the method implementation type
matching logic before declaration of method in super class
is seen. This fixes the warning coming out of that method mismatch.
// rdar://14650159


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188438 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e7205c0e2472dd66238f4c6b6db1b7cc2957b42a 10-Aug-2013 Robert Wilhelm <robert.wilhelm@gmx.net> Omit llvm:: before SmallVector and SmallVectorImpl. We have using directive in include/clang/Basic/LLVM.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
0111e4da0133c7fb4815e5c60524d2aaddfbccf0 17-Jul-2013 Robert Wilhelm <robert.wilhelm@gmx.net> Even more code conformance.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
80f8aca7aeac5be1c9c33813c2afcab6538199aa 17-Jul-2013 Fariborz Jahanian <fjahanian@apple.com> More code conformance.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
a3c6246950f23d7d4cd748badaf8f05d7bc3f14a 16-Jul-2013 Fariborz Jahanian <fjahanian@apple.com> This patch removes unused parameter allProperties and converts remaining
parameters in ArrayRef'ize Sema::ActOnAtEnd to ArrayRef.
Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
38b3bd8bf3c424e82b4dca0acaec84af28666656 10-Jul-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: merge objc_requires_super attribute of
method declaration into its implementation to
prevent a bogus warning about mismatched attributes.
then make sure the warning about missing call to super comes out
of the method implementation. // rdar://14251387


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4549d7ffc15bdd7ab860aa68db089d9f559b79e7 09-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> ArrayRef'ize Sema::FinalizeDeclaratorGroup, Sema::BuildDeclaratorGroup and
Sema::ActOnDocumentableDecls.

Patch by Robert Wilhelm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4cb3d909cb4af5efc073fd4122d4998c466a220e 06-Jul-2013 Sylvestre Ledru <sylvestre@debian.org> Remove some useless declarations (found by scan-build)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3b20f581de2ddd824ef86114ff65fcf37fe02973 27-Jun-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC: diagnose duplicate declaration of
private ivars in class extensions and class
@implementation. // rdar://14278560


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7348454025693dd20a411c2bcaabd4460cb87559 26-Jun-2013 Joerg Sonnenberger <joerg@bec.de> Don't use unnamed local enums as template arguments.
Fixes -Werror bootstrap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8c0501c7370d894a735692b92fab62bbb05d86bd 24-Jun-2013 Reid Kleckner <reid@kleckner.net> [Sema] Call CheckParmForFunctionDef on ObjC method parameters

CheckParmForFunctionDef performs standard checks for type completeness
and other things like a destructor check for the MSVC++ ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184740 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8a52dce457673cfa90fff5749dc3b797404857f2 21-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Delete dead code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
104f96ba1a59026d6a71b4ef39ca127b56324e4a 21-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Delete dead code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
fc46be997f8219e11900473c373b639525396064 21-Jun-2013 Douglas Gregor <dgregor@apple.com> When building a module, keep *all* declared methods in the global method pool.

As an optimization, we only kept declared methods with distinct
signatures in the global method pool, to keep the method lists
small. Under modules, however, one could have two different methods
with the same signature that occur in different (sub)modules. If only
the later submodule is important, message sends to 'id' with that
selector would fail because the first method (the only one that got
into the method pool) was hidden. When building a module, keep *all*
of the declared methods.

I did a quick check of both module build time and uses of modules, and
found no performance regression despite this causing us to keep more
methods in the global method pool. Fixes <rdar://problem/14148896>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e7e8fcacef233f35ad7e81083f7edd12497f6c40 18-Jun-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> When declaring an ObjC interface decl with a @compatibility_alias alias name, change the class name to the "real" one.

If we have something like

@class NewImage;
@compatibility_alias OldImage NewImage;
@class OldImage;

the lookup for 'OldImage' will return the 'NewImage' decl ("@class NewImage").
In such a case, when creating the decl for "@class OldImage" use the real declaration name ("NewImage"),
instead of the alias one ("OldImage"), otherwise we will break IdentifierResolver and redecls-chain invariants.

Fixes crash of rdar://14112291.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
cd9c9b5c464419116cc00145286589b13fd9eadf 18-Jun-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: Fixes a typo correction bug where a
selector would be correted to identical selector name
in certain corner cases. // rdar://7853549


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
419245e0719e1785e4eb3954ddaee122e921c738 18-Jun-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C [qoi]: privide typo correction for selectors
in addition of receiver having static type, but also when
receiver has dynamic type (of 'id' variety) as well as when
receiver is of 'Class' type vareity. // rdar://7853549


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
d395e34ae7aeeeaf9a37a12bc0f6de87158c95c3 17-Jun-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C [qoi]: Provide fixit hint when message with typo
is sent to a receiver object. This is wip. // rdar://7853549


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
ddb5a3926d715ab4354ca36117679e3f4d5d3e21 14-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Unify return type checking for functions and ObjC methods. Move all the
random checks for ObjC object return types to SemaType.cpp.

Fixes issue with ObjC method type checking reported on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4fe9644dc3533e4517f980645957c6fc9408c6f6 06-Jun-2013 Richard Trieu <rtrieu@google.com> Don't create a StringRef from a temporary string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
9464a08a743295d6aefaca1a751b5b4d371cf99c 05-Jun-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: Provide fixit with suggested spelling correction
for -Wundeclared-selector warnings. // rdar://14039037



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
639aa529211c266c83546c3047bdb428e9c7a87c 30-May-2013 Fariborz Jahanian <fjahanian@apple.com> fixes a comment in my last patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f98c688968777214bfff7a6cc9bbd4ff78e9c1d3 30-May-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: Implements gcc's -Wselector option
which diagnoses type mismatches of identical
selectors declared in classes throughout.
// rdar://14007194


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
b8ed071b88c1fd100eaa701f5fd7f5ebe8b9e362 16-May-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C arc: Diagnose when user attempts to
synthesize a property getter method that overrides
a method definition named 'retain' and the like.
Fixes // rdar://13885083


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7247c88d1e41514a41085f83ebf03dd5220e054a 15-May-2013 David Blaikie <dblaikie@gmail.com> Use only explicit bool conversion operator

The most common (non-buggy) case are where such objects are used as
return expressions in bool-returning functions or as boolean function
arguments. In those cases I've used (& added if necessary) a named
function to provide the equivalent (or sometimes negative, depending on
convenient wording) test.

DiagnosticBuilder kept its implicit conversion operator owing to the
prevalent use of it in return statements.

One bug was found in ExprConstant.cpp involving a comparison of two
PointerUnions (PointerUnion did not previously have an operator==, so
instead both operands were converted to bool & then compared). A test
is included in test/SemaCXX/constant-expression-cxx1y.cpp for the fix
(adding operator== to PointerUnion in LLVM).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
fbff0c4510c7f0e0f30a005960e434b973f5bd21 13-May-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C error recovery. This patch makes a quick
recovery form duplicate method definition error thus
preventing doc parsing to loop trying to find comment
for the invalid redefinition in a previous declaration.
// rdar://13836387


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
ab3d509bc45218c278454962ff644bb13d18ce1a 27-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix an assertion hit in Sema::CheckObjCMethodOverrides.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
2e3d8c0815acaf1bc5995ebe56cea07471e5c9c7 17-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Enhance the ObjC global method pool to record whether there were 0, 1, or >= 2 methods (with a particular selector) inside categories.

This is done by extending ObjCMethodList (which is only used by the global method pool) to have 2 extra bits of information.
We will later take advantage of this info in global method pool for the overridden methods calculation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
ec64244f5939fa81596fbeddad966cca4b4a4c51 13-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Parsing support for thread_local and _Thread_local. We give them the same
semantics as __thread for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3c9a0240b6db6ee02a24f48c753089bda48843ae 09-Apr-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: This patch fixes a none-issuance of warning
when result type of protocol property and getter method
differ by fixing a more serious problem. When a forward
protocol declaration comes between its definition and
its use in class protocol list, the forward protocol
ast was being used in building the protocol list.
// rdar://12522752


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
740991bdf8bb2638ff111ae2084791c52c1cee00 04-Apr-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: Issue deprecated warning when using a
deprecated typedef to subclass or invoke a class method.
// rdar://13569424


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b846381fc3099b2340ba8c74d16178203a60d9a0 04-Apr-2013 John McCall <rjmccall@apple.com> Be sure to check ARC conventions on the implicit method declarations
of a property just in case the property's getter happens to be +1.
We won't synthesize a getter for such a property, but we will allow
the user to define a +1 method for it.
rdar://13115896

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
d2615cc53b916e8aae45783ca7113b93de515ce3 03-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Add 178663 back.

http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green
before it processed the reverted 178663, so it could not have been the culprit.

Revert "Revert 178663."

This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41 03-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert 178663.

Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb

Revert "Don't compute a patched/semantic storage class."

This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8f187f62cb0487d31bc4afdfcd47e11fe9a51d05 03-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't compute a patched/semantic storage class.

For variables and functions clang used to store two storage classes. The one
"as written" in the code and a patched one, which, for example, propagates
static to the following decls.

This apparently is from the days clang lacked linkage computation. It is now
redundant and this patch removes it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
8b43d2b0ea2d72b53a10f38903b176e58cb93b9c 27-Mar-2013 Ted Kremenek <kremenek@apple.com> Split "incomplete implementation" warnings for ObjC into separate warnings.

Previously all unimplemented methods for a class were grouped under
a single warning, with all the unimplemented methods mentioned
as notes. Based on feedback from users, most users would like
a separate warning for each method, with a note pointing back to
the original method declaration.

Implements <rdar://problem/13350414>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7cca821e1acf0f1b4fe892c3111bfb2086832e4e 19-Mar-2013 John McCall <rjmccall@apple.com> Add a clarifying note when a return statement is rejected because
we expect a related result type.

rdar://12493140

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c7f811638f8603fa373d2be724e8b1c8ba51ad75 18-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add missing diagnostic for a nested-name-specifier on a free-standing type definition. Bump some related diagnostics from warning to extension in C++, since they're errors there. Add some missing checks for function specifiers on non-function declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
41f3f3a4792f46787632fdb94f952f6b3ce3f4ae 05-Mar-2013 Jordan Rose <jordan_rose@apple.com> Silence a number of static analyzer warnings with assertions and such.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7666b03d499819214752ae392efe666ca856d0e7 07-Feb-2013 Douglas Gregor <dgregor@apple.com> Retain all hidden methods in the global method pool, because they may become visible <rdar://problem/13172858>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b892d7010f9c2c61e2f3a2686546cbfbffbedef3 21-Jan-2013 Douglas Gregor <dgregor@apple.com> Eliminate Sema::CompareProperties(), which was walking over a pile of
lexical declarations looking for properties when we could more
efficiently check for property mismatches at property declaration
time. Good for ~1% of -fsyntax-only time when most of the properties
we're checking against come from an AST file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
aabd094cf694039fe823987e133af7ac25cb9711 21-Jan-2013 Douglas Gregor <dgregor@apple.com> Eliminate the oddly-named Sema::ComparePropertiesInBaseAndSuper, which
did a redundant traversal of the lexical declarations in the
superclass. Instead, when we declare a new property, look into the
superclass to see whether we're redeclaring the property. Goot for 1%
of -fsyntax-only time on Cocoa.h and a little less than 3% on my
modules test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f373c5d0b7f04fc3fa4e34bdfb868d118de6a641 18-Jan-2013 Douglas Gregor <dgregor@apple.com> When checking the parameter types of an Objective-C method, don't
decay the parameter type immediately; let CheckParameter() do its
job. Fixes <rdar://problem/12071218>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
f0e00046711280d494f3ef2d85ae67a442b97406 16-Jan-2013 Douglas Gregor <dgregor@apple.com> Teach global selector lookup to ignore hidden methods, which occur
when the methods are declared in a submodule that has not yet been
imported. Part of <rdar://problem/10634711>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f4d918fdf7da64215db8abe63945798c66e6d132 15-Jan-2013 Douglas Gregor <dgregor@apple.com> When checking availability attributes for consistency between an
overriding and overridden method, allow the overridden method to have
a narrower contract (introduced earlier, deprecated/obsoleted later)
than the overriding method. Fixes <rdar://problem/12992023>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
86f6cf6800fa7ea3669e057c56f3487c4da3ef46 11-Dec-2012 Douglas Gregor <dgregor@apple.com> Don't complain about incomplete implementations for methods that are
unavailable due to availability attributes. <rdar://problem/12798237>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5fa667612e0466982407ae678cdfeb68b878ed65 17-Nov-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C: Do not issue deprecated warning about implementation
of a deprecated method in original class (or category), only
in overrides. // rdar://12717705


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
6a6bb2810cc8478730002c950f9261f6cb5f6143 24-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> Objective-C: check that when a category method is being implemented,
method type in cateogry matches the implementation.
// rdar://12519216


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166518 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
535a5d001b2035a7aa68ee368fbe44ec90e33740 19-Oct-2012 Jordan Rose <jordan_rose@apple.com> Allow objc_requires_super to be used to check class methods as well.

Also, unify ObjCShouldCallSuperDealloc and ObjCShouldCallSuperFinalize.
The two have identical behavior and will never be active at the same time.

There's one last simplification now, which is that if we see a call to
[super foo] and we are currently in a method named 'foo', we will
/unconditionally/ clear the ObjCShouldCallSuper flag, rather than check
first to see if we're in a method where calling super is required. There's
no reason to pay the extra lookup price here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
0ec56b7add7be643f490ea9b430823570f01b4e2 18-Oct-2012 Axel Naumann <Axel.Naumann@cern.ch> From Vassil Vassilev: enable Sema to deal with multiple ExternalSemaSources.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
9fb6f7939c4b76b444b7f7b2761b130e7709ac08 13-Sep-2012 Fariborz Jahanian <fjahanian@apple.com> remove duplicate code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
a1a32f7f5966edf47c1e22bcbeb2a09bc462ff0b 13-Sep-2012 Fariborz Jahanian <fjahanian@apple.com> Move back the stuff about missing ownership attribute warning
to SemaDeclObjC and apply some simplification per John's
comment. // rdar://12280826


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
ca5c4c9bfeb4b1ac645b04723c0319b0fc96073e 13-Sep-2012 Fariborz Jahanian <fjahanian@apple.com> Move no explicit ownership warning to SemaType.cpp.
// rdar://12280826


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
00024796eaa29055e76fc99ffdc668c702e6fe9d 12-Sep-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C arc: don't issue no explicit ownership warning when
__autoreleasing is explicitely added to param type.
// rdar://12280826


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
6f9386049c6dee2df33a4b7a6dfeda2733acce7d 10-Sep-2012 Fariborz Jahanian <fjahanian@apple.com> More tweaking and test cases for call to super
annotations. // rdar://6386358


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
841011373b345cf79d0da4b7242dcf2869a43502 08-Sep-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C: introduce __attribute((objc_requires_super)) on method
in classes. Use it to flag those method implementations which don't
contain call to 'super' if they have 'super' class and it has the method
with this attribute set. This is wip. // rdar://6386358


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
31ba6135375433b617a8587ea6cc836a014ebd86 06-Sep-2012 Roman Divacky <rdivacky@freebsd.org> Dont cast away const needlessly. Found by gcc48 -Wcast-qual.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
918546c584c91ee917c919c967d7d73cecd295dc 31-Aug-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C ARC: under -Wexplicit-ownership-type diagnose those
method parameter types which are reference to an objective-C
pointer to object with no explicit ownership. // rdar://10907090



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
129a60b35a8a06a3b245f87bee56458979b32ba2 25-Aug-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C: Do not warn if align attribute on method
declaration is not provided. It is only necessary on
the method implementation. // rdar://11593375


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8c6cb462946b8be19167fad7ff21d4f9fbaebfef 09-Aug-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C: refactor/simplify parsing of delayed
method/c-funcs defined in objc class implementation.
No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161540 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
de01b7a6b4df27555ff7b25e51c0d3df29e3a0cf 09-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13558: Fix typo 'compatiblity'. Thinking of the children. Apparently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
95aac15936e8362aeb4813f95bc255dee6473592 01-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Fix an assertion failure instantiating a constexpr function from within a -dealloc method. PR13401.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
1b0a13e91088f6818016464ffb23616ced820cbc 30-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c arc: ARC IRGen correctly assumes result
type of generated call to super dealloc is 'void'
and asserts if user's dealloc is not of 'void type.
This rule must be enforced in clang front-end (with a
fixit) if this is not the case, instead of asserting in CodeGen.
// rdar://11987838


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
abd56c816e9164b17bb3e7154a511b0c9896ffdb 13-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Attaching comments to declarations during parsing: handle more Objective-C declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
a5ef44ff5d93a3be6ca67782828157a71894cf0c 11-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Enable comment parsing and semantic analysis to emit diagnostics. A few
diagnostics implemented -- see testcases.

I created a new TableGen file for comment diagnostics,
DiagnosticCommentKinds.td, because comment diagnostics don't logically
fit into AST diagnostics file. But I don't feel strongly about it.

This also implements support for self-closing HTML tags in comment
lexer and parser (for example, <br />).

In order to issue precise diagnostics CommentSema needs to know the
declaration the comment is attached to. There is no easy way to find a decl by
comment, so we match comments and decls in lockstep: after parsing one
declgroup we check if we have any new, not yet attached comments. If we do --
then we do the usual comment-finding process.

It is interesting that this automatically handles trailing comments.
We pick up not only comments that precede the declaration, but also
comments that *follow* the declaration -- thanks to the lookahead in
the lexer: after parsing the declgroup we've consumed the semicolon
and looked ahead through comments.

Added -Wdocumentation-html flag for semantic HTML errors to allow the user to
disable only HTML warnings (but not HTML parse errors, which we emit as
warnings in -Wdocumentation).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c4133a477389dacb4479a96ee2227b92aea0a237 06-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: don't involve properties when checking
under -Wsuper-class-method-mismatch for method
mismatches in current and suprt class.
// rdar://11793793


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
2e2c7a40b7164e8499b2551c363550d6da68dc97 03-Jul-2012 Chandler Carruth <chandlerc@gmail.com> Remove a redundant assignment to the FDecl variable from *inside* it's
initializer.

I really feel like Clang should warn about this, but I can't describe
a good reason. GCC will warn on this in some cases under
-Wsequence-point, but it actually seems like a false positive for that
warning....

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
6c89eafc90f5c51a0bf185a993961170aee530c2 03-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: just as we have done for method definitions,
c-functions declared in implementation should have their
parsing delayed until the end so, they can access forward
declared private methods. // rdar://10387088


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
260611a32535c851237926bfcf78869b13c07d5b 20-Jun-2012 John McCall <rjmccall@apple.com> Restructure how the driver communicates information about the
target Objective-C runtime down to the frontend: break this
down into a single target runtime kind and version, and compute
all the relevant information from that. This makes it
relatively painless to add support for new runtimes to the
compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z,
available at the driver level as a better and more general
alternative to -fgnu-runtime and -fnext-runtime. This new
concept of an Objective-C runtime also encompasses what we
were previously separating out as the "Objective-C ABI", so
fragile vs. non-fragile runtimes are now really modelled as
different kinds of runtime, paving the way for better overall
differentiation.

As a sort of special case, continue to accept the -cc1 flag
-fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak.

I won't go so far as to say "no functionality change", even
ignoring the new driver flag, but subtle changes in driver
semantics are almost certainly not intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
1dfbd92c83699820bfaa352e83083124e34fc9dc 14-Jun-2012 James Dennett <jdennett@google.com> Still more Doxygen documentation fixes:
* Escape #, < and @ symbols where Doxygen would try to interpret them;
* Fix several function param documentation where names had got out of sync;
* Delete param documentation referring to parameters that no longer exist.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
811bfcd823d51db6a06b3fd5a5943ff910b79d68 27-May-2012 Benjamin Kramer <benny.kra@googlemail.com> Use the SelectorSet typedef more widely throughout Sema.

While there make it a SmallPtrSet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
0a4a23a6afd6db4bdcedd4e9f39d8baf4a446f15 18-May-2012 Douglas Gregor <dgregor@apple.com> A selector match between two Objective-C methods does *not* guarantee
that the methods have the same number of parameters, although we
certainly assumed this in many places. Objective-C can be insane
sometimes. Fixes <rdar://problem/11460990>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
dd87224ad67b79e9c48dd4a06779b353aa633cbb 18-May-2012 Douglas Gregor <dgregor@apple.com> In the override search for Objective-C methods, protect against ASTs that have NULL interfaces behind a category, which can happen in invalid code. Fixes <rdar://problem/11478173>, a recent regression

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e15db6f0d226a3bc88d244512d1004c7c1c07391 09-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [AST/libclang] Speed up clang_getOverriddenCursors() considerably by reserving a bit
in ObjCMethodDecl to indicate whether the method does not override any other method,
which is the majority of cases.

That way we can avoid unnecessary work doing lookups, especially when PCH is involved.

rdar://11360082

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
d10099e5c8238fa0327f03921cf2e3c8975c881e 04-May-2012 Douglas Gregor <dgregor@apple.com> Move Sema::RequireCompleteType() and Sema::RequireCompleteExprType()
off PartialDiagnostic. PartialDiagnostic is rather heavyweight for
something that is in the critical path and is rarely used. So, switch
over to an abstract-class-based callback mechanism that delays most of
the work until a diagnostic is actually produced. Good for ~11k code
size reduction in the compiler and 1% speedup in -fsyntax-only on the
code in <rdar://problem/11004361>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c968334510b0193ae8977c83d3ee66cbd6867639 03-May-2012 Douglas Gregor <dgregor@apple.com> Do not keep track of the set of visited Objective-C containers when
performing the search for overridden methods. We very rarely see the
same container twice, and in those rare cases we still have the
fallback of the second SmallPtrSet to eliminate duplicates. Good for
~1.5% -fsyntax-only speedup on the code in <rdar://problem/11004361>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
ff310c763eeb41a7aaa3b928cd0bc0a6e493d5dd 02-May-2012 Douglas Gregor <dgregor@apple.com> Eliminate Sema::CompareMethodParamsInBaseAndSuper() entirely, by
folding its one check into the normal path for checking overridden
Objective-C methods. Good for another 3.6% speedup on the test case in
<rdar://problem/11004361>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8722ae8f6083cc27bef430e2815ceea77ffa0b28 02-May-2012 Douglas Gregor <dgregor@apple.com> The semantic checking that verifies whether an Objective-C method
declared in a subclass has consistent parameter types with a method
having the same selector in a superclass performs a significant number
of lookups into the class hierarchy. In the example in
<rdar://problem/11004361>, we spend 4.7% of -fsyntax-only time in
these lookups.

Optimize away most of the calls to this routine
(Sema::CompareMethodParamsInBaseAndSuper) by first checking whether we
have ever seen *any* method with that selector (using the global
selector table). Since most selectors are unique, we can avoid the
cost of this name lookup in many cases, for a 3.3% speedup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
b2f6820773aabff3c5c9e0dbb1cbbbda0d80c41f 06-Apr-2012 Patrick Beard <pcbeard@mac.com> Added a new attribute, objc_root_class, which informs the compiler when a root class is intentionally declared.
The warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger
the warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
fce79ebc6c16676b106ade71356b3adfc11493e7 24-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make sure we don't accept an @interface inside another objc container
just because there was an attribute in front of it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
1b7f9cbed1b96b58a6e5f7808ebc9345a76a0936 13-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix PR10447: lazily building name lookup tables for DeclContexts was broken.
The deferred lookup table building step couldn't accurately tell which Decls
should be included in the lookup table, and consequently built different tables
in some cases.

Fix this by removing lazy building of DeclContext name lookup tables. In
practice, the laziness was frequently not worthwhile in C++, because we
performed lookup into most DeclContexts. In C, it had a bit more value,
since there is no qualified lookup.

In the place of lazy lookup table building, we simply don't build lookup tables
for function DeclContexts at all. Such name lookup tables are not useful, since
they don't capture the scoping information required to correctly perform name
lookup in a function scope.

The resulting performance delta is within the noise on my testing, but appears
to be a very slight win for C++ and a very slight loss for C. The C performance
can probably be recovered (if it is a measurable problem) by avoiding building
the lookup table for the translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
cd707abbc758149d9f7d37bd0b25298455c678b2 13-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix crash at @implementation with a forward reference as base class.

rdar://11020003

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
9a0b6b4e2bf6a9ef41d32b4e83f2911981d2d44d 12-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [Sema] -Add an invalid objc category to the DeclContext so that it can be
serialized
-Don't add methods of invalid objc containers to the global method pool.
This protects us from trying to serialize a method whose container was not
serialized.

Part of rdar://11007039.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
b732fcebcf2ce5c24a29d660e9400d7dc9f86b69 29-Feb-2012 Daniel Dunbar <daniel@zuster.org> Sema/ObjC: Override search can generate a large search list, bump the base size
of the SmallPtrSet way up to avoid commonly reallocating the buffer size.
- I didn't see a good argument against it, so I bumped the limit to cover the
max size we see during parsing Cocoa.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3306ec1923973d7b5767b23ba95915af2fec87d7 27-Feb-2012 Ted Kremenek <kremenek@apple.com> After numerous requests, have Objective-C 'method declared here' notes mention the actual method. This looks better within an IDE, where text isn't always regurgitated in the presentation of a warning. Fixes radar 10914035.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
644af7b50bd0541468b45c197f5b637e934d48a0 23-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Make sure that all top-level decls in a @implementation are
marked as such.

Previously we missed tag declarations; fixes rdar://10902015

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
16e46dd0c284296cea819dfbf67942ecef02894d 01-Feb-2012 Kaelyn Uhrain <rikka@google.com> Make the callback object to Sema::CorrectTypo mandatory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
0d266d623452f09d06973528217390d762a8f3fa 25-Jan-2012 Douglas Gregor <dgregor@apple.com> Whenever Sema attempts to look in the global method pool, try to load
additional data from the external Sema source. This properly copes
with modules that are imported after we have already searched in the
global method pool for a given selector. For PCH, it's a slight
pessimization to be fixed soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5ac4b6917aa34fae6da64036539023a6155a3d48 25-Jan-2012 Douglas Gregor <dgregor@apple.com> Rework the external Sema source's ReadMethodPool() so that it doesn't
return pre-built lists. Instead, it feeds the methods it deserializes
to Sema so that Sema can unique them, which keeps the chains shorter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
44fae525e792f09ecbe07c0a62cdbcb81e04306b 25-Jan-2012 Douglas Gregor <dgregor@apple.com> Factor out the addition of a method into the global method pool, and
teach it to always add the new method at the *end* of the list rather
than as the second element in the list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e42670bb6885934f01a6f7ffce58add5b5b3822b 24-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: Ignore with warning forward class declaration whose name
matches a typedef declaring an object type. // rdar://10733000


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
47b1d96bde79633d4aeded1cde2c5f870a58af24 14-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> objc: disallow __block attribute on method params.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
2f4d88f4418afafbd0b22ce0f79cdead6f3a6f99 13-Jan-2012 Kaelyn Uhrain <rikka@google.com> Fix up the calls to CorrectTypo in Sema*ObjC.cpp to use callback
objects, and add a basic CorrectionCandidateCallback template class
to simplify the fixups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
71207fc0470e1eee40a2951cd5cc3ff47725b755 05-Jan-2012 Ted Kremenek <kremenek@apple.com> After further discussion, rename attribute 'objc_disable_automatic_synthesis' to 'objc_requires_property_definitions'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
eb4f2c56c298071d58b441ccf801b039be93788a 03-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> objc: use objc_suppress_autosynthesis attribute on classes
which should not be default synthesized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
a28cb3ee88946deeb8e58d41c1e75de2d93e9cbd 02-Jan-2012 Douglas Gregor <dgregor@apple.com> Eliminate ObjCProtocolDecl's end-of-definition location. It is not
used anywhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
ec1a58b201b3276966aaade8ac3ac4705aba96c2 02-Jan-2012 Douglas Gregor <dgregor@apple.com> Move ObjCProtocolDecl::EndLoc into its DefinitionData, and give
ObjCProtocolDecl proper source-range information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
3937f87e53b3ee0c8da93536f48f6f96c006309d 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Eliminate ASTMutationListener::UpdatedAttributeList, which is no
longer needed now that we aren't back-patching ObjCProtocolDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
28441e6cee11fe6c2b3e13980f81203d14e73202 21-Dec-2011 Fariborz Jahanian <fjahanian@apple.com> objc QOI: Don't't warn about mismatch between attributes
on method declaration and definition if former is in
a system header. // rdar://10580333


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
05c272fed899b8d3142cf080e86a235fc6168862 15-Dec-2011 Douglas Gregor <dgregor@apple.com> Move ObjCInterfaceDecl's "EndLoc" into DefinitionData, since it only
applies to an actual definition. Plus, clarify the purpose of this
field and give the accessor a different name, since getLocEnd() is
supposed to be the same as getSourceRange().getEnd().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
60ef308e51c71b760d7f598c1b763ceb7b768148 15-Dec-2011 Douglas Gregor <dgregor@apple.com> Replace all comparisons between ObjCInterfaceDecl pointers with calls
to declaresSameEntity(), as a baby step toward tracking forward
declarations of Objective-C classes precisely. Part of
<rdar://problem/10583531>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7209646add692c50503435bcffb13187a3349552 13-Dec-2011 Fariborz Jahanian <fjahanian@apple.com> objc: diagnose duplicate declaration of methods
in classes. // rdar://10535349


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
9aab9c4116bb3ea876d92d4af10bff7f4c451f24 10-Dec-2011 Douglas Gregor <dgregor@apple.com> Make sure that we infer __strong, etc. when we instantiate variables
under ARC. Fixes <rdar://problem/10530209>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
d64251fd56577dd5c78903454632361e094c6dc1 06-Dec-2011 Erik Verbruggen <erikjv@me.com> Extend warnings for missing '@end'.
Fixes PR2709.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
ec236787c5868eef53a807ca1a68b6b0b8c604c6 06-Dec-2011 Fariborz Jahanian <fjahanian@apple.com> objc: put out more coherent warning when method definition
attributes don't match its declaration. // rdar://10529259.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
a38c4730fb016abc20a5479540b65ff3992095ab 01-Dec-2011 Douglas Gregor <dgregor@apple.com> When typo-correction an Objective-C superclass name, don't
typo-correct to ourselves.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c14a03dffff69b5e1c55cc118fc52d8fd9f3a28d 23-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Fix operations (token annotation, getting cursor, etc.) with a file region
inside an objc container that "contains" other file-level declarations.

When getting the array of file-level declarations that overlap with a file region,
we failed to report that the region overlaps with an objc container, if
the container had other file-level declarations declared lexically inside it.

Fix this by marking such declarations as "isTopLevelDeclInObjCContainer" in the AST
and handling them appropriately.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
37f40572c4c78a8c57a7b45266f8b86db172a7c1 23-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang] Indexing API: Fix issues, mostly C++ related.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b3029960632ca8a3248e74770eda64d6c16f7246 14-Nov-2011 Douglas Gregor <dgregor@apple.com> Use Sema::RequireCompleteType to check for the completeness of
Objective-C classes. This has two purposes: to consistently provide
"forward declaration here" notes when we hit an incomplete type, and
to give LLDB a chance to complete the type.

RequireCompleteType bits from Sean Callanan!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4fc04da71ed46d63dc991dbea4fd52341e56c0a1 13-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't crash when a duplicate interface/protocol is inside an extern "C" context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
1a43415b28e60e0e421ef60e254126acec7ab462 12-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a method in ASTMutationListener for the last use of Decl's [is/set]ChangedSinceDeserialization
and remove them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
1104d9b305e5cee1b2d915cd57520d02d3107781 27-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> For the "'@end' is missing in implementation context" point at the location of '@'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
ee28a4be624c875e1a3ad08e84f17841117897a1 22-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> Fixes a minor hick up to my last patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142711 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7fda400103a5ae21fdc5f31b07c69cf60737cb29 22-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> objc: private methods can have their attributes, no diagnostic is required.
None private methods if their implementation have attribute, they must exactly
match those in their declarations. // rdar://10271563


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b4a686df4de21ec4eeca69211b21f7fe716abeae 17-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce ASTConsumer::HandleTopLevelDeclInObjCContainer which accepts
top-level declarations that occurred inside an ObjC container.

This is useful to keep track of such decls otherwise when e.g. a function
is declared inside an objc interface, it is not passed to HandleTopLevelDecl
and it is not inside the DeclContext of the interface that is returned.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
a6b8b2c09610b8bc4330e948ece8b940c2386406 10-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Constant expression evaluation refactoring:
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
36bc2c663f600e7c9dc1a800d36f16603ca3ea51 10-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> objc: Some refactoring of overriding method decl. code
for future work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c076e37e2223cfe998fa5e657dece30da78fcdc4 07-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implicitly assume that a ObjC category to an unavailable interface is also unavailable;
only give an 'unavailable' error on the @implementation of the category. rdar://10234078

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3a387441ae339363ee5b254658f295e97bd9e913 07-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> When using an unavailable/deprecated interface Foo inside Foo's interface/implementation
don't emit unavailable errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
a1e797e7c0de5f4ac63ff902f22f457cc9360ba7 05-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix the rewriter, rdar://10234024.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
8cd8de4c0fb5f3e86dbbde5844903136c5e0e046 28-Sep-2011 Ted Kremenek <kremenek@apple.com> Tweak -Wobjc-missing-super-calls to not warning about missing [super dealloc] when in GC-only mode, and to not warning about missing [super finalize] when not using GC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3240fe3b715327c8fda6f5a3bc8a092b1fce82a7 28-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objcetive-c-arc: When overriding a method, its ns_consumed patameter
attribute must match its overriden method. Same also for
ns_returns_retained/not_retained on the result type.
This is one half of // rdar://10187884


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
d6471f7c1921c7802804ce3ff6fe9768310f72b9 26-Sep-2011 David Blaikie <dblaikie@gmail.com> Rename Diagnostic to DiagnosticsEngine as per issue 5397


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
1d9b3b25f7ac0d0195bba6b507a684fe5e7943ee 09-Sep-2011 John McCall <rjmccall@apple.com> Give conversions of block pointers to ObjC pointers a different cast kind
than conversions of C pointers to ObjC pointers. In order to ensure that
we've caught every case, add asserts to CastExpr that strictly determine
which cast kind is used for which kind of bit cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e97179c675b341927807c718be215c8d1aab8acb 08-Sep-2011 Douglas Gregor <dgregor@apple.com> Implement the Objective-C 'instancetype' type, which is an alias of
'id' that can be used (only!) via a contextual keyword as the result
type of an Objective-C message send. 'instancetype' then gives the
method a related result type, which we have already been inferring for
a variety of methods (new, alloc, init, self, retain). Addresses
<rdar://problem/9267640>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8697d308c1bdd50e5c45757ac11be701c26e9e97 01-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: this patch (re)introduces objective-c's default property
synthesis. This new feature is currently placed under
-fobjc-default-synthesize-properties option
and is off by default pending further testing.
It will become the default feature soon.
// rdar://8843851


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
140ab234c23f392d5422691c5de1ee3c15026def 31-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c - This patch buffers method implementations
and does the Sema on their body after the entire
class/category @implementation is seen. This change allows messaging
of forward private methods, as well as, access to
synthesized ivars of properties with foward synthesize
declarations; among others. In effect, this patch removes
several restrictions placed on objective-c due to in-place
semantics processing of methods.
This is part of // rdar://8843851.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
2334f3aeda318f68e763379afa5ac7a91b90caa7 30-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove a couple of unnecessary objc method lookups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
27f0776caf8c0d0870eb0125a13a613603848203 30-Aug-2011 Nico Weber <nicolasweber@gmx.de> Do not warn about [super finalize] in arc mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
10af87932fe4bffad539b24d512a33a1803daeae 29-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Minor clean up of objc's decl context stuff.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
8c7e67d7644c3ab298bd6be724c9480da0979af6 26-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Don't warn on category implementing a method, if
declated method in the class belongs to a synthesized
property getter/setter. // rdar://10014946


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
ca4c40ab4995d195d9a4d175fa7c30dcc2d99ebf 26-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc - fix a bug exposed by my recent decl context
changes. // rdar://10015110


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f09530f88ece49993f1b72271b0417574e897956 25-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Reverse r138567 until a buildbot failure is investigated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
90dedc86d9cbeabfb8c63e497ca30ddff3fa5608 25-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Fixes a typo in my last patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
d8e987bee9d39f9131e9be319483265fd894c108 25-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc -arse: Use DeclGroup for forward class declarations;
as in @class foo, bar. More cleanup to follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4eb14ca3ded87493ddfab73cf4be7fc24c3d48ea 22-Aug-2011 Ted Kremenek <kremenek@apple.com> Do not perform check for missing '[super dealloc]' under ARC as calling -dealloc is illegal in that mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138261 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
58a764940df0cd41767367eb2f4fced6f374176b 22-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objc - minor comment fix up and cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
9a1ecf0522ccb7a45577f856150c15af0ee1df2a 22-Aug-2011 Nico Weber <nicolasweber@gmx.de> Warn on missing [super dealloc] calls.

This matches gcc's logic. Half of PR10661.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
a28948f34817476d02412fa204cae038e228c827 22-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Restore patch I reversed in r138040. Known buildbot
failures are resolved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e6f07f538fd0eddd6c087fcc01d4e4ff19129c71 19-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Revers r138040. Need to look at a few buildbot failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3dbf2f5f00cfc8b25318c119c0d39f4a49d15ebe 19-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Bring objective-c handling of decl context
to modernity. Instead of passing down individual
context objects from parser to sema, establish decl
context in parser and have sema access current context
as needed. I still need to take of Doug's comment for
minor cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
730cfb18463d8c2f6d0e4d4380fdd67e4abe5d97 10-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Using existing infrastructure for finding
overridden methods to diagnose their type mismatch.
This is a general solution for previous fixes
for // rdar://6191214 and // rdar://9352731
and removes lots of duplicate code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
2112190efa85f50af84a3c4efe03c5bf69247ba2 08-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: diagnose protocol inconsistencies in following
situation. When a class explicitly or implicitly (through inheritance)
"conformsTo" two protocols which conflict (have methods which conflict).
This patch fixes the previous patch where warnings were coming out in
non-deterministic order. This is 2nd part of // rdar://6191214.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7ca13ef64136929df852c038ebbddee070dc5119 08-Aug-2011 David Chisnall <csdavec@swan.ac.uk> Silence the category-replacing-class-method warning for +load: category
implementations of +load do not replace the class definition in a meaningful
sense, they are run when the category loads, the +load method for class is run
when the class is loaded.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
270ba59c4111c9e9d040cf3b95f1f3e0a8440dff 06-Aug-2011 Ted Kremenek <kremenek@apple.com> Revert 136984 and 136927.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
6a3bec320e5617922f1f15657dcdaeb22610ca23 04-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: diagnose protocol inconsistencies in following
situation. When a class explicitly or implicitly (through inheritance)
"conformsTo" two protocols which conflict (have methods which conflict).
This is 2nd part of // rdar://6191214.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
a56a992cbe651051a9cfb75c3ea411df4dc4c201 04-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> Refactoring of my last patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
74133075f5024ce87e4c1eb644d77c20e1c521f4 03-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Methods declared in methods must type match
those declated in its protocols. First half or // rdar://6191214


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
fefe91e6017321aa7db431b94cb3615f6c97da7a 29-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: warn if implementation of a method in category
masks an existing method in its primary class, class extensions,
and primary class's non-optional protocol methods; as primary
class, or one of its subclass's will implement this method.
This warning has potential of being noisy so it has its own
group. // rdar://7020493


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5b9dc7caaef0469babc45dd8e713727a136ce517 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Make Sema::ReferencedSelectors lazily deserialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
eee3ef177a171c06f826c331e7a9e256d01eaeb0 24-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc: clang should warn if redeclaration of methods
declared in protocol in the class qualified by the
protocol have type conflicts. To reduce amount of
noise, this is done when class is implemented.
// rdar://9352731


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
6c2c250db1e2d0138bbfaadbbec3118db7e8a8c9 22-Jul-2011 John McCall <rjmccall@apple.com> In Objective-C, pull arbitrary attributes from overridden
methods, including indirectly overridden methods like those
declared in protocols and categories. There are mismatches
that we would like to diagnose but aren't yet, but this
is fine for now.

I looked at approaches that avoided doing this lookup
unless we needed it, but the infer-related-result-type
checks were doing it anyway, so I left it with the same
fast-path check for no previous declartions of that
selector.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
db8264e4c5ffd7af6fbad4ca4306bd382bb02691 22-Jul-2011 Jordy Rose <jediknil@belkadan.com> Add a const overload for ObjCInterfaceDecl::all_declared_ivar_begin.
This was previously not-const only because it has to lazily construct a chain
of ivars the first time it is called (and after the chain is invalidated).
In practice, all the clients were just const_casting their const Decls;
all those now-unnecessary const_casts have been removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
feb4fa165c5e8c40ffc8b1b655cc3c8071862b20 21-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> Add FixIt hint for missing 'id' type.
// rdar://9615045


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
aab24a616de59c543d78d7636f22fb786053fefa 21-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc - Diagnose missing method return type specifier under
a warning flag. // rdar://9615045


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
1e159bc43cf6575a415dbe8deb7fc49611002ffe 16-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> Fix a typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
79e6bd379773447a74cc3e579d9081e4c5cb6d63 12-Jul-2011 Douglas Gregor <dgregor@apple.com> Centralize the getCanonicalType() calls in the Itanium C++ mangling
code so that they only occur in a single place. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
d8bba9c15230d2b1b3893e272106aa79efc50251 28-Jun-2011 Douglas Gregor <dgregor@apple.com> Add support for C++ namespace-aware typo correction, e.g., correcting

vector<int>

to

std::vector<int>

Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes
PR5776/<rdar://problem/8652971>.

Thanks Kaelyn!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3215398dc9dac2be19a9fc1df929e6b7d83eafca 28-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Centralize the check for a tag definition in a Declarator::PrototypeContext inside GetTypeForDeclarator.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
327126ee3d2faad9314b2633974eefc672f73b79 24-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> No need to warn if 'unavailable' method/property
is not implemented. // rdar://9651605


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
a81397323cc8475ef8243f938118a9c231fb18ff 24-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> When forming a cycle in objc's inheritance hierarchy,
diagnose it properly and don't throw clang into an
infinit loop. // rdar://9653341


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
0f4c4c4445b194db6a086ea91ec8e7af963a456c 16-Jun-2011 John McCall <rjmccall@apple.com> Weaken the type-matching rules for methods that return aggregates when
complaining about mismatches in the global method pool.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
74da19fc3a52d7e3005eeb7a7833859da84fd12a 15-Jun-2011 Douglas Gregor <dgregor@apple.com> Introduce a -cc1-level option to turn off related result type
inference, to be used (only) by the Objective-C rewriter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4c4efee6d3113f20b41efaeec08934332d2ea40e 13-Jun-2011 Douglas Gregor <dgregor@apple.com> Eliminate the -f[no]objc-infer-related-result-type flags; there's no
reason to allow the user to control these semantics through a flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
05a2e9459baa92ab0b739fc31411660ca9d9ec99 13-Jun-2011 Douglas Gregor <dgregor@apple.com> Document CheckObjCMethodOverrides

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
819e9bfe398bd556f43ca1f0c24d1b3fa21f41ef 13-May-2011 Fariborz Jahanian <fjahanian@apple.com> refactor CheckForwardProtocolDeclarationForCircularDependency returns
'true' on detecting protocol cycles. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
96b69a7305e20c98f1a3e2e7cd52e2d6c5d53835 13-May-2011 Fariborz Jahanian <fjahanian@apple.com> After issuing diagnostics on circular protocol list,
don't build circular AST in protocol's protocol list
when user code has introduced it. Indexer and other
clients may crash. // rdar://9221614


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7079886ab5a9df450ed773419f0ae81f8404e2aa 02-May-2011 John McCall <rjmccall@apple.com> Revise the representation of parameter scope data so that the
scope depth overlaps with the ObjCDeclQualifier, dropping
memory usage back to previous levels.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
09e2c524a18435211cfbc2fb355f91e1ac43ea89 01-May-2011 John McCall <rjmccall@apple.com> Improve the documentation for the two ObjCDeclQualifiers so that I
stop considering whether I can compress them. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
81ef3e664d8ae250fbb68b2b6ccdeebb6c13ede5 23-Apr-2011 John McCall <rjmccall@apple.com> Diagnose C++ abstract parameters for Objective-C methods.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
64089cece350472c04b420c497ae391443353325 23-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Fixes an instance method meta-data generation bug in
ObjC NeXt runtime where method pointer registered in
metadata belongs to an unrelated method. Ast part of this fix,
I turned at @end missing warning (for class
implementations) into an error as we can never
be sure that meta-data being generated is correct.
// rdar://9072317


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
162e1c1b487352434552147967c3dd296ebee2f7 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Support for C++11 (non-template) alias declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
fc8f0e14ad142ed811e90fbd9a30e419e301c717 15-Apr-2011 Chris Lattner <sabre@nondot.org> fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
0a0d2b179085a52c10402feebeb6db8b4d96a140 23-Mar-2011 Douglas Gregor <dgregor@apple.com> Implement a new 'availability' attribute, that allows one to specify
which versions of an OS provide a certain facility. For example,

void foo()
__attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));

says that the function "foo" was introduced in 10.2, deprecated in
10.4, and completely obsoleted in 10.6. This attribute ties in with
the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that
we want to deploy back to Mac OS X 10.1). There are several concrete
behaviors that this attribute enables, as illustrated with the
function foo() above:

- If we choose a deployment target >= Mac OS X 10.4, uses of "foo"
will result in a deprecation warning, as if we had placed
attribute((deprecated)) on it (but with a better diagnostic)
- If we choose a deployment target >= Mac OS X 10.6, uses of "foo"
will result in an "unavailable" warning (in C)/error (in C++), as
if we had placed attribute((unavailable)) on it
- If we choose a deployment target prior to 10.2, foo() is
weak-imported (if it is a kind of entity that can be weak
imported), as if we had placed the weak_import attribute on it.

Naturally, there can be multiple availability attributes on a
declaration, for different platforms; only the current platform
matters when checking availability attributes.

The only platforms this attribute currently works for are "ios" and
"macosx", since we already have -mxxxx-version-min flags for them and we
have experience there with macro tricks translating down to the
deprecated/unavailable/weak_import attributes. The end goal is to open
this up to other platforms, and even extension to other "platforms"
that are really libraries (say, through a #pragma clang
define_system), but that hasn't yet been designed and we may want to
shake out more issues with this narrower problem first.

Addresses <rdar://problem/6690412>.

As a drive-by bug-fix, if an entity is both deprecated and
unavailable, we only emit the "unavailable" diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
90ba78c64d0c24cfbc1bf88728db9775d44d7f9f 12-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Place duplicate argument declaration in in
method prototypes under the -Wduplicate-method-arg and
turn it off by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
eca5d22c16eb784e5f35ca816fa22e0c0e060417 02-Mar-2011 John McCall <rjmccall@apple.com> Support a new InheritableAttr subclass, InheritableParamAttr, which is
used for attributes that are okay to inherit when written on a parameter.
Dependent on LLVM r126827.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
21761c8378a493c32ab0f7d2b8880986a0ba73a3 22-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Warn when type modifiers on objc method declarations in
protocols do not match with method implementation.
// rdar://7076235


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
337e550218128e7d922c09bb354fbc71de90c568 18-Feb-2011 Chris Lattner <sabre@nondot.org> Switch labels over to using normal name lookup, instead of their
own weird little DenseMap. Hey look, we now emit unused label
warnings deterministically, amazing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
98d810ee83d4c4bf5d89bbb43829533b84b20ecf 16-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Check for deprecated implementation unconditionally.
Warning and its note will be ignored in default case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8f457004a1fdfc9c70fb52c5bc2e9d4ea6780d8d 16-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Fix typo (per Chris's comment).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5ac96d5f54a94d57f485de8103eb05a0f19e1c39 15-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Refactoring of code to issue warning on implemented
deprecated class and methods in objective-c.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b1224f69089815fd66b04ae33215b7fba10780aa 15-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Warn if method for a deprecated method is implemented.
Warn if class for a deprecated class is implemented.
Warn if category for a deprecated class is implemented.
All under control of -Wdeprecated-implementations.
// rdar://8973810.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7f53253223b29d77f1e9c5c0ce93a19932761b77 09-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Fix scoping of method declarations and issue
warning when same parameter name used multiple times.
// rdar://8877730


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8b789139167d721e3ef1e3d433eabeb351c36fad 05-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> -Wselector should warn on implemented selectors only
when selector metadata is generated, which is triggered
by at least on class implementation. This is to match gcc's
behavior. // rdar://8851684.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
cbb67480094b3bcb5b715acd827cbad55e2a204c 08-Jan-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Renamed CXXBaseOrMemberInitializer to CXXCtorInitializer. This is both shorter,
more accurate, and makes it make sense for it to hold a delegating constructor
call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c32647d111e516593b9ba242cad7b8ff4016c155 23-Dec-2010 Ted Kremenek <kremenek@apple.com> Add -fobjc-default-synthesized-properties flag
to allow us to explicitly control whether or
not Objective-C properties are default synthesized.
Currently this feature only works when using
the -fobjc-non-fragile-abi2 flag (so there is
no functionality change), but we can now turn
off this feature without turning off all the features
coupled with -fobjc-non-fragile-abi2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122519 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
bdb2d5056fd675c27307b34efd371bbba6839e92 21-Dec-2010 Douglas Gregor <dgregor@apple.com> Fix a major inconsistency in the representation of Objective-C
classes, categories, protocols, and class extensions, where the
methods and properties of these entities would be inserted into the
DeclContext in an ordering that doesn't necessarily reflect source
order. The culprits were Sema::ActOnMethodDeclaration(), which did not
perform the insertion of the just-created method declaration into
the DeclContext for these Objective-C entities, and
Sema::ActOnAtEnd(), which inserted all method declarations at the
*end* of the DeclContext.

With this fix in hand, clean up the code-completion actions for
property setters/getters that worked around this brokenness in the AST.

Fixes <rdar://problem/8062781>, where this problem manifested as poor
token-annotation information, but this would have struck again in many
other places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8e5fc9be37c6828ad008f22730e3baac1bef1686 21-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Warn when message is sent to receiver of
unknown type and there is a possibility that
at runtime method is resolved to a deprecated or
unavailable method. Addreses // rdar://8769853


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
0827408865e32789e0ec4b8113a302ccdc531423 15-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix diagnostic pragmas.

Diagnostic pragmas are broken because we don't keep track of the diagnostic state changes and we only check the current/latest state.
Problems manifest if a diagnostic is emitted for a source line that has different diagnostic state than the current state; this can affect
a lot of places, like C++ inline methods, template instantiations, the lexer, etc.

Fix the issue by having the Diagnostic object keep track of the source location of the pragmas so that it is able to know what is the diagnostic state at any given source location.

Fixes rdar://8365684.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c78f684c8e300414956bc1566957a17a48da2fc8 11-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Enhance my implementation of //rdar ://8747333 in r121597 to allow
for declaration of property setter/getter in forward
class extensions and also skip over
propeties which are @dynamic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
88f5e9be350f4b107f8665183a6d441874e0fcc7 11-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Any property declared in a class extension might have user
declared setter or getter in current class extension or one
of the other class extensions. Mark them as synthesized as
property will be synthesized when property with same name is
seen in the @implementation. This prevents bogus warning
about unimplemented methods to be issued for these methods.
Fixes // rdar://8747333


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
61c8d3ecac8d565136ac82e9ea06c351227c9c5a 30-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Improve diagnostics reporting of un-implemented
methods in protocols when protocols are in system
headers and thus ignored. //rdar: //8227199


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
10302c01e8ceffd86c1a2b1bb15466e852ca8898 28-Oct-2010 John McCall <rjmccall@apple.com> Implement the newest status quo for method override checking. The idea now
is that we need more information to decide the exact conditions for whether
one ObjCObjectPointer is an acceptable return/parameter override for another,
so we're going to disable that entire class of warning for now. The
"forward developement" warning category, -Wmethod-signatures, can receive
unrestricted feature work, and when we're happy with how it acts, we'll
turn it on by default.

This is a pretty conservative change, and nobody's totally content with it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
1235b0ebb16618bf41a9e7234d5e2690faf97d37 26-Oct-2010 John McCall <rjmccall@apple.com> Pending further discussion, re-enable warnings for Objective C
covariant/contravariant overrides and implementations, but do so under
control of a new flag (-Wno-objc-covariant-overrides, which yes does cover
contravariance too).

*At least* the covariance cases will probably be enabled by default shortly,
but that's not totally uncontroversial.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e8a2d4c32cb2a7840bd91c9cf9b7838ee3f47dc3 25-Oct-2010 David Chisnall <csdavec@swan.ac.uk> Only warn for mismatched types in Objective-C methods when they are incompatible, not when they are simply different. Now we test whether the difference in types breaks the principle of substitutability, rather than whether they are different.

A common idiom in Objective-C is to provide a definition of a method in a subclass that returns a more-specified version of an object than the superclass. This does not violate the principle of substitutability, because you can always use the object returned by the subclass anywhere that you could use the type returned by the superclass. It was, however, generating warnings with clang, leading people to believe that semantically correct code was incorrect and requiring less accurate type specification and explicit down-casts (neither of which is a good thing to encourage).

This change ensures that any method definition has parameter and return types that make it accept anything that something conforming to the declaration may pass and return something that the caller will expect, but allows stricter definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f54e3aec8a12c3ce453b1012e686c4b88881564a 09-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Method implemented in class's implementation may implement
one declared in class's extension and not one declared
in class's superclass. This supresses a bogus warning on
method type mismatch.
Fixes //rdar: // 8530080


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c4b35cfdb977f6427fe0d5725bf104e1b425d72e 06-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Add message to attribute(deprecated).
attribute(unavailable) to do next.
// rdar:// 6734520.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
bdaae392d4ede29c992db6c40c14860a0505415f 05-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Method declaration and its implementation must match in all their types.
Previously, compiler warned only if it was unsafe if types
did not match. Fixes // rdar: //7933061



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
23c0104bb8ad04f06804bd399cbc1f5f962b356c 18-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose use of incomplete type on method argument type of
method definitions instead of crashing in code gen.
Fixes radar 8421082.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
7a126a474fdde06382b315b4e3d8ef0a21d4dc31 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename DeclContext::getLookupContext to getRedeclContext and change its semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
d931b086984257de68868a64a235c2b4b34003fb 26-Aug-2010 John McCall <rjmccall@apple.com> De-memberify the VarDecl and FunctionDecl StorageClass enums.
This lets us remove Sema.h's dependency on Expr.h and Decl.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
2d88708cbe4e4ec5e04e4acb6bd7f5be68557379 26-Aug-2010 John McCall <rjmccall@apple.com> Split out a header to hold APIs meant for the Sema implementation from Sema.h.
Clients of Sema don't need to know (for example) the list of diagnostics we
support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
781472fe99a120098c631b0cbe33c89f8cef5e70 25-Aug-2010 John McCall <rjmccall@apple.com> Split FunctionScopeInfo and BlockScopeInfo into their own header.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
50df6ae41f232612e5e88b19e0db9900d08d2f6c 25-Aug-2010 John McCall <rjmccall@apple.com> Remove the DenseSet dependency from Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5f1e0942a32657b625702aa52f82430d0120f424 24-Aug-2010 John McCall <rjmccall@apple.com> More header elimination. The goal of all this is to allow Parser to
#include Sema.h while keeping all the AST declarations opaque. That may
not be reasonably attainable, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b3d8748e797c6c2f1dc01186c8eeb3b1b5fe970c 24-Aug-2010 John McCall <rjmccall@apple.com> Abstract out passing around types and kill off ActionBase.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
d226f65006733ed7f709c3174f22ce33391cb58f 21-Aug-2010 John McCall <rjmccall@apple.com> DeclPtrTy -> Decl *



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
19510856727e0e14a3696b2a72c35163bff2a71f 20-Aug-2010 John McCall <rjmccall@apple.com> Another step in the process of making the parser depend on Sema:
- move DeclSpec &c into the Sema library
- move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3c7f4134603d04b44f997b43c0a9def270f25386 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> More PCH -> AST renaming.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
cf807c4dfdb23e8fa3f400e0b24ef5b79db7a530 19-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Generate Attr subclasses with TableGen.

Now all classes derived from Attr are generated from TableGen.
Additionally, Attr* is no longer its own linked list; SmallVectors or
Attr* are used. The accompanying LLVM commit contains the updates to
TableGen necessary for this.

Some other notes about newly-generated attribute classes:

- The constructor arguments are a SourceLocation and a Context&,
followed by the attributes arguments in the order that they were
defined in Attr.td

- Every argument in Attr.td has an appropriate accessor named getFoo,
and there are sometimes a few extra ones (such as to get the length
of a variadic argument).

Additionally, specific_attr_iterator has been introduced, which will
iterate over an AttrVec, but only over attributes of a certain type. It
can be accessed through either Decl::specific_attr_begin/end or
the global functions of the same name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
0b17c61e8f143901ce11b4a6e5129ac63aaeee04 13-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Instead of modifying the ObjC AST to not modify existing declarations, teach chained PCH to overwrite declarations from earlier PCH files in dependent ones. Tell Sema to note when it changes AST nodes so that they have to be reserialized. Finally, the ObjCProtocolDecls created in forward decls, like the ObjCInterfaceDecls in @class forward decls, are not lexically part of the decl context; only the definition is.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e737f5041a36d0befb39ffeed8d50ba15916d3da 12-Aug-2010 Douglas Gregor <dgregor@apple.com> Move Sema's headers into include/clang/Sema, renaming a few along the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
6b308f6dc7d8f1581c52095f435c0e1284b111d8 10-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Implements gcc's -Wstrict-selector-match.
(radar 8127244).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
59c451ef236ec5af8fecc7291f5cb87a3ea6e799 07-Aug-2010 Douglas Gregor <dgregor@apple.com> Fix an Objective-C crasher, PR7839.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
db9d2145f1d85f64dba2c9b92416621ce01090a6 03-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Simplify global method pool implementation in Sema. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
bf1a028246d884a540aeafa38e89be59a269b072 05-Jun-2010 John McCall <rjmccall@apple.com> Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.
This is never null, but the associated type might be.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
561da7e046ea6b39f4e632c68128fd01c985b46b 22-May-2010 Fariborz Jahanian <fjahanian@apple.com> Clang missing warning about conflicting declaration vs. definition
for variable arguments list methods. (radar 8006060).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
68dd3ee3b5ae5b7694b4a21e34b4355431ed0457 20-May-2010 Douglas Gregor <dgregor@apple.com> Various small fixes for construction/destruction of Objective-C++
instance variables:
- Use isRecordType() rather than isa<RecordType>(), so that we see
through typedefs in ivar types.
- Mark the destructor as referenced
- Perform C++ access control on the destructor


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c12c5bba6ceb6acd4e51e7a0fc03257da9cfd44e 15-May-2010 John McCall <rjmccall@apple.com> Substantially alter the design of the Objective C type AST by introducing
ObjCObjectType, which is basically just a pair of
one of {primitive-id, primitive-Class, user-defined @class}
with
a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared). ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.

Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet. Remove some number of methods that are no
longer used, at least after this patch.

By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
509d477ae5a24282719320fe92038ccf57358840 14-May-2010 Fariborz Jahanian <fjahanian@apple.com> Implement new default property synthesis rules. Essentially, no longer
user directive is needed to force a property implementation.
It is decided based on those propeties which are declared in
the class (or in its protocols) but not those which must be
default implemented by one of its super classes. Implements radar 7923851.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
17cb326cb62a59f53d92236394af40eaae4eddbd 05-May-2010 Fariborz Jahanian <fjahanian@apple.com> This patch deals with Sema Part of Setter/Getter synthesis
of properties which are of C++ objects. Code Gen to follow
(Radar 7468090).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
324b54d3f60d92a82815512119791ce1c285b63e 03-May-2010 Douglas Gregor <dgregor@apple.com> Diagnose unused exception parameters under a different warning group
(-Wunused-exception-parameter) than normal variables, since it's more
common to name and then ignore an exception parameter. This warning is
neither enabled by default nor by -Wall. Fixes <rdar://problem/7931045>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e4498c6d66a8f472cba29b6158a2e86dfc60d0ef 28-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> More of Sema to implement initialization of
ivar of c++ object types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
786cd154f2a48d2b464679d33fcd5df0cd794c06 27-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Move CollectIvarsToConstructOrDestruct to Sema
from AST, consider ivar array of objects
(per Doug's comment).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
be270a0fae647ae3fb4d6a21ba1ea5ab9c40853a 26-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement template instantiation for Objective-C @catch
statements. This is the last of the Objective-C statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
160b5630aa781ac348303e1ae088d27016637778 26-Apr-2010 Douglas Gregor <dgregor@apple.com> Refactor Objective-C @catch parameter checking by detangling it from
function-parameter checking and splitting it into the normal
ActOn*/Build* pair in Sema. We now use VarDecl to represent the @catch
parameter rather than the ill-fitting ParmVarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102347 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c00d8e18ad3d903acfeb5d05163ce90713066a3f 26-Apr-2010 Douglas Gregor <dgregor@apple.com> Make the static type of the exception variable in an Objective-C
@catch a VarDecl. The dynamic type is still a ParmVarDecl, but that
will change soon. No effective functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4e6c0d19b7c072758922cf80525a81aeefc6e64b 24-Apr-2010 Douglas Gregor <dgregor@apple.com> Rework Parser-Sema interface for Objective-C @catch exception object
arguments. Rather than having the parser call ActOnParamDeclarator
(which is a bit of a hack), call a new ActOnObjCExceptionDecl
action. We'll be moving more functionality into this handler to
perform earlier checking of @catch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
16573fa9705b546b7597c273b25b85d6321e2b33 20-Apr-2010 Douglas Gregor <dgregor@apple.com> Keep track of the actual storage specifier written on a variable or
function declaration, since it may end up being changed (e.g.,
"extern" can become "static" if a prior declaration was static). Patch
by Enea Zaffanella and Paolo Bolzoni.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
422bae76c7900101427e05895f315c1d22a237a5 18-Apr-2010 Ted Kremenek <kremenek@apple.com> Allow the 'ibaction' attribute to be attached to method declarations (and not issue a warning).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c0b39640de335809ca7544f802751112619f30cc 16-Apr-2010 Douglas Gregor <dgregor@apple.com> Audit uses of Sema::LookupSingleName for those lookups that are
intended for redeclarations, fixing those that need it. Fixes PR6831.

This uncovered an issue where the C++ type-specifier-seq parsing logic
would try to perform name lookup on an identifier after it already had
a type-specifier, which could also lead to spurious ambiguity errors
(as in PR6831, but with a different test case).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c83c6874e3bf1432d3df5e8d3530f8561ff5441f 16-Apr-2010 Douglas Gregor <dgregor@apple.com> Feed proper source-location information into Sema::LookupSingleResult,
in case it ends up doing something that might trigger diagnostics
(template instantiation, ambiguity reporting, access
reporting). Noticed while working on PR6831.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
aaf87162c5fbfbf320072da3a8e83392e1bbf041 14-Apr-2010 Douglas Gregor <dgregor@apple.com> Teach typo correction about various language keywords. We can't
generally recover from typos in keywords (since we would effectively
have to mangle the token stream). However, there are still benefits to
typo-correcting with keywords:
- We don't make stupid suggestions when the user typed something
that is similar to a keyword.
- We can suggest the keyword in a diagnostic (did you mean
"static_cast"?), even if we can't recover and therefore don't have
a fix-it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
78713d86faeaaabb8aeb1683353e791defd3a3bf 09-Apr-2010 Douglas Gregor <dgregor@apple.com> When upgrading an Objective-C class from a forward declaration to a
full-fledged @interface, be sure that the declaration has the right
lexical context. <rdar://problem/7827709>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4ecb25fa94897b2c03510292acace710e5262ba5 09-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a regression caused by implementing cstyle methods
for objc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
4f4fd92c6c64ecbc65507f63ddd09211f732622c 08-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to implement gcc's cstyle arguments in objc
methods. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
24e14089cc509ff48cf7f1e6f4f9070803dd739b 02-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> diagnose declaring class extension after its implementation
(radar 7822210).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
521468391c0abbbfcf6b257442630c70314b8576 31-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Patch implements gcc's -Wno-protocol option to suppress warning
on unimplemented methods in protocols adopted by a class.
(radar 7056600).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
849b243d4065f56742a4677d6dc8277609a151f8 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Reinstate my CodeModificationHint -> FixItHint renaming patch, without
the C-only "optimization".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
275313cbb0847f1f117f60d144d113804d4fa42d 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Revert r100008, which inexplicably breaks the clang-i686-darwin10 builder

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
d0ebe080eee7c37e73754068b47fd90cc506e128 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Rename CodeModificationHint to FixItHint, since we've been using the
term "fix-it" everywhere and even *I* get tired of long names
sometimes. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f28385991fa724ac0bd6017d709f17b1838cfea3 27-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Further improvement to point to category
whose protocolls methods needs implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8822f7cda557ffa755c16b5c978dada23c37d6be 27-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Improve diagnostics on incomplete implementation
of objc classes; including which methods
need be implemented and where they come from.
WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
01f1bfc3284d5817517d35217885ea9ecb252817 22-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes access rues for ivars declared in class
implementations (radar 7547942).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
9d64c15223497f31899cc47fbe1531873dc06f2e 12-Mar-2010 Ted Kremenek <kremenek@apple.com> Split Sema logic for ObjC @property and @synthesize into
a separate file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7d2aa11c5c3b85a9d727ff868de666ba3bff5b59 11-Mar-2010 Ted Kremenek <kremenek@apple.com> For ivars created using @synthesize, set their DeclContext to be
the @implementation (instead of the @interface) and actually add
the ivar to the DeclContext (which we weren't doing before).

This allows us to simplify ASTContext::CollectNonClassIvars() by
removing ASTContext::CollectProtocolSynthesizedIvars(). Now all
ivars can be found by either inspecting the ObjCInterfaceDecl and
its companion ObjCImplementationDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
9ea9bdbc14374f7bacdb50d3e52c664ff12150ff 02-Mar-2010 Douglas Gregor <dgregor@apple.com> Keep an explicit stack of function and block scopes, each element of
which has the label map, switch statement stack, etc. Previously, we
had a single set of maps in Sema (for the function) along with a stack
of block scopes. However, this lead to funky behavior with nested
functions, e.g., in the member functions of local classes.

The explicit-stack approach is far cleaner, and we retain a 1-element
cache so that we're not malloc/free'ing every time we enter a
function. Fixes PR6382.

Also, tweaked the unused-variable warning suppression logic to look at
errors within a given Scope rather than within a given function. The
prior code wasn't looking at the right number-of-errors count when
dealing with blocks, since the block's count would be deallocated
before we got to ActOnPopScope. This approach works with nested
blocks/functions, and gives tighter error recovery.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97518 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
6d97e5e4b7abdae710c2548b51f4ed0298e86d80 01-Mar-2010 Chris Lattner <sabre@nondot.org> Implement jump checking for initialized c++ variables, implementing
a fixme and PR6451.

Only perform jump checking if the containing function has no errors,
and add the infrastructure needed to do this.

On the testcase in the PR, we produce:

t.cc:6:3: error: illegal goto into protected scope
goto later;
^
t.cc:7:5: note: jump bypasses variable initialization
X x;
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f914b9782a6091a7c7dfd41b0a273ee724351b84 24-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> More Sema check for ivars in class continuation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
09b6897d967c50db36ad83b910060ea7d68a21bc 23-Feb-2010 Ted Kremenek <kremenek@apple.com> Fix another crash on invalid code. In this case, handle ObjC categories (with no names)
that refer to an undefined class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
bd94d442f6801a4d2a25d53c1843690533180a6d 19-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Start supporting declaration of ivars in @implementation
blocks. WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
11062e11236b7bc689dad150e8b490fd6b063ec3 19-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Patch removes IVars list from ObjCInterfaceDecl and
instead relies on their DeclContext for iteration, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
2f14c4d18fcba4b4577dbe43016d6d42ef9973cf 17-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Use proper lexcial context for newly added ivars.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3a21cd92f425680fcbfbab9552c0787b09ae9ca7 17-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Allow for declaration and use of ivars in a stand-alone
implementation (toward radar 7547942).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
298ed870c7d8edf243edf14d624e577d4a3a8800 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Allocate 'ObjCMethodList' objects (owned by Sema) using Sema's BumpPtrAllocator. Previously they were not getting freed. Fixes <rdar://problem/7635663>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
77e2dde750c271155f35949a6d3c22f8e7d287f8 09-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Finish implementing property synthesis by default.
(radar 7381956).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
412e798941ca64e2e6b084323915fa9aa5f6bdf3 09-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Implement synthesizing properties by default.
This is a non-fragile-abi feature only. Since it
breaks existing code, it is currently placed under
-fobjc-nonfragile-abi2 option for test purposes only
until further notice. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
3ad230eb626d630877c17d6e81b167ec7476d84e 20-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Settled rule on warning on unimplemented property in
category implementation when some implementations
are missing in the primary class implementation.
(fixes radar 6505200).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
a84f2e4270fb36e3ad9d849c4343e38a42aefe6f 20-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Improve performance of warning when not implementing a required
property of a protocol (my previous patch). No change in functionality.
(radar 7544809).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3ac1edaab9063f1235a2939ca82ba4db24bbf695 20-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to implement required warnings for unimplemented
properties imported frfom protocol. Fixes radar 7544809.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
107089f36de33b03f411ace7b9352606a69bc3af 18-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Mostly renaming some methods and updating comments to
reflect what these methods are actually doing. One method
template for future work. No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
782f2f52b78d8ca785110398a7f7b56b830b9ac7 07-Jan-2010 Ted Kremenek <kremenek@apple.com> Change ObjCContainerDecl to contain the entire range for the '@end'
piece of the declaration. The '@' and the 'end' are separate tokens,
and require two SourceLocations to accurately track.

This change was motivated because ObjCContainerDecl::getSourceRange()
would previously not return the entire range of the declaration (the
'end' would be left off).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
67dd1d4df1b28973e12e0981129b2517d2033b66 07-Jan-2010 Douglas Gregor <dgregor@apple.com> Whenever we emit a typo-correction diagnostic, also emit a note
pointing to the declaration that we found that has that name (if it is
unique).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92877 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
a6f26387355c9a9e61a33c480e28f1a9a15f9b62 07-Jan-2010 Douglas Gregor <dgregor@apple.com> When suggesting a typo correction for an @implementation without a
corresponding @interface, provide a note showing which interface we're
referring to. This note has the fix-it hint on it.

Also, don't automatically apply fix-it hints for notes. They're meant
to express fix-its that would change semantics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b73e281956ff1ba40c921511a2cd6e7e76ed86a7 06-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a bug when property is redeclared in multiple
continuation classes and its original declaration
is imported from a protocol. This fixes radar 7509234.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
02deae8f9bb2cbd177816cd6b4b10129461980f7 06-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Do not diagnose method disguised as property setter
for a 'readonly' property. Fixes radar 7427072.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
95ff742380d1c3dd5152739183bfe085cf27197f 04-Jan-2010 Douglas Gregor <dgregor@apple.com> When declaring an Objective-C implementation without a corresponding
interface, suggest correction of typos. For example, given:

@interface NSString
@end

@implementation NSstring
@end

we'll warn with:

t.m:4:19: warning: cannot find interface declaration for 'NSstring';
did you mean 'NSString'?
@implementation NSstring
^

However, since this is just a warning, we don't provide a fix-it
hint. Good idea, Ted!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f06cdae9c68dfc4191fbf6b9e5ea0fd748488d88 03-Jan-2010 Douglas Gregor <dgregor@apple.com> Implement typo correction for a variety of Objective-C-specific
constructs:

- Instance variable lookup ("foo->ivar" and, in instance methods, "ivar")
- Property name lookup ("foo.prop")
- Superclasses
- Various places where a class name is required
- Protocol names (e.g., id<proto>)

This seems to cover many of the common places where typos could occur.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92449 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
6dd30fc45af6bdee05a735d9817b6d9c72cdce35 17-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose duplicate declaration of a property. Fixes
PR5809


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
dd69aae2851577e4266b62f3430a1fce757b65ae 16-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose property of reference type as unsupported
instead of crashing for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
41ce66f8e20159d8bd39fff54ae01608da06c294 10-Dec-2009 John McCall <rjmccall@apple.com> Improve the diagnostic when a new declaration conflicts with a using shadow
declaration. Rename note_using_decl to note_using, which is possibly less confusing.
Add a test for non-class-scope using decl collisions and be sure to note the case
we can't diagnose yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
3393f8157a11627fd52889fbc3fd279f6704d5d4 18-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Don't warn if objc method param types in declaration and
implementation mismatch in their qualifiers only.
This will match similar behavior in c/c++ and
fixes radar 7211653.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
c09cba67d0ad01e53e0fed07322e95dd281bcfd9 18-Nov-2009 Ted Kremenek <kremenek@apple.com> Pass source locations of identifiers referenced by @class through Action::ActOnForwardClassDeclaration().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c32b1d82c1f6d0f0d6c615beb3b6bdfbfbea7098 17-Nov-2009 Ted Kremenek <kremenek@apple.com> Do not register ObjCInterfaceDecls implicitly created by @class in the
current DeclContext. These "imaginary" declarations pose issues for
clients searching DeclContext for actual declarations. Instead,
register them for name lookup, and add the ObjCInterfaceDecl later to
the DeclContext when we hit an actual @interface declaration.

This also fixes a bug where the invariant that the Decls in a
DeclContext are sorted in order of their appearance is no longer
violated. What could happen is that an @class causes an
ObjCInterfaceDecl to get added first to the DeclContext, then the
ObjCClassDecl itself is added, and then later the SourceLocation of
the ObjCInterfaceDecl is updated with the correct location (which is
later in the file). This breaks an assumed invariant in
ResolveLocation.cpp (and possibly other clients).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5f8f8571c52dbf12fdefb15d2fedbcccb212c15c 17-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Start support of weak_import objective-c classes.
(Radar 6815425).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
63e963cdffca9530f920dbab58b9b4eecb2a582c 16-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Handle case of missing '@end' in implementation context
gracefully, on par with gcc, by: Issuing a warning,
doing final sematinc check of its definitions and generating
its meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7ca8b0694840385d707689eba9ad965e7b28c8cb 11-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> writable atomic property's setter/getter must be in 'lock' step of
either both synthesized or bith user defined.
Implements radar 6557233.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4770a4a3d4e55fa8ad691bf4c046fae519120a09 10-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Changed a variable name to match what it represents
(Ted's feedback).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
d669be595aa3a9be05edffa56d0e713d58f80823 06-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Since default writable attribute is 'assign', allow
specification of 'assign' (no warning to be issued),
when a continuation class makes a 'readonly' attribute
'readwrite' but also specifies the 'assign' attribute.
(this matches gcc's behavior and prevents exessive
warnings)/


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
54abf7d4fa3123b8324c09d2a4dfb789fd818403 04-Nov-2009 John McCall <rjmccall@apple.com> Change our basic strategy for avoiding deprecation warnings when the decl use
appears in a deprecated context. In the new strategy, we emit the warnings
as usual unless we're currently parsing a declaration, where "declaration" is
restricted to mean a decl group or a few special cases in Objective C. If
we *are* parsing a declaration, we queue up the deprecation warnings until
the declaration has been completely parsed, and then emit them only if the
decl is not deprecated.
We also standardize the bookkeeping for deprecation so as to avoid special cases.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
cc667e2bd2ed7aaf99bc52c58d127644b8ebbfc8 03-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Assortment of property attributes declared in continuation
class must match those of same property declared
in its primary class. (Fixes radar 7352425)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
3684bd4c9518f6507d375ff8e4a4e32ce3bb51c3 02-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose implementation of a property declared in a category
in its class implementation instead of crashing. Fixes radar 7350345.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
58e4677a948e80c92deeebbcd3bdd9266adda798 23-Oct-2009 John McCall <rjmccall@apple.com> Remove OriginalTypeParmDecl; the original type is the one specified
in the DeclaratorInfo, if one is present.

Preserve source information through template instantiation. This is made
more complicated by the possibility that ParmVarDecls don't have DIs, which
is possibly worth fixing in the future.

Also preserve source information for function parameters in ObjC method
declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f36e02d4aff98bf2e52e342e0038d4172fbb5e64 09-Oct-2009 John McCall <rjmccall@apple.com> Refactor the LookupResult API to simplify most common operations. Require users to
pass a LookupResult reference to lookup routines. Call out uses which assume a single
result.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
183700f494ec9b6701b6efe82bcb25f4c79ba561 22-Sep-2009 John McCall <rjmccall@apple.com> Change all the Type::getAsFoo() methods to specializations of Type::getAs().
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.

The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8b26cbd4e4c01cb7a06ec2f794f2fce3b58cf4d0 11-Sep-2009 Steve Naroff <snaroff@apple.com> Make sure ObjCInterfaceDecl's that are forward declared always contain a valid location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
32844b35f61e04b23618e19c5ea41d57b975f9ac 28-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> patch to prevent crash in hopelessly incorrect
method definition with labels.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
835ed7f15bd8a89226fd7976d96be19995f1c1c8 22-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Don't issue warning on multiple selector found when
selector name is for a @selector expression.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e8661906d49ef6c9694a9cc845ca62a85dbc016d 19-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use Sema's LocInfoType to pass and preserve type source info through the Parser.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
b11d798984a4cef5beeea8c0152090d8af77ab6e 14-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a regression in deciding when to issue warning on properties which
implement NSCopying protocol in GC mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
acf2d137f362ede2b8f6a86b4f9dd9f6bcf00d7a 12-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> error on property of objc interface type instead of crashing


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
ac5fc7c6bcb494b60fee7ce615ac931c5db6135e 04-Aug-2009 Mike Stump <mrs@apple.com> Canonicalize else.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e198f5d609dda2b6d0435f040ebe2479a4e378ba 04-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Some code refactoring. Be more generous in issuance of warning
on method type mismatches per Chris's comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78075 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
dbdec8bcb5686cd34763db49488f77e88c43eb64 04-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Compare matching selectors in current and
super class(s) and warn on any parameter
type mismatch if potentially unsafe.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
4084c306635b70f37029dca938444e6013f08684 23-Jul-2009 Steve Naroff <snaroff@apple.com> Remove a bunch of FIXME's related to ObjC type checking.

- Move Sema::ObjCQualifiedIdTypesAreCompatible(), Sema::QualifiedIdConformsQualifiedId(), and a couple helper functions to ASTContext.
- Change ASTContext::canAssignObjCInterfaces() to use ASTContext:: ObjCQualifiedIdTypesAreCompatible().
- Tweak several test cases to accommodate the new/improved type checking.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
87018775ed689d0a67357cf767747166044b3a27 21-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove Sema::LookupObjCImplementation and replace it with just calling ObjCInterfaceDecl::getImplementation().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
f49545602089be5b1f744e04326b8a566f6d8773 16-Jul-2009 Steve Naroff <snaroff@apple.com> Remove ASTContext::isObjCObjectPointerType().
Convert all clients to use the new predicate on Type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
fdee089b11e0bb57aa2c7291dd5e4201c2f906ff 10-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> don't crash if class is using itself as its super class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
9cdda0cf8528e3d595be9bfa002f0450074beb4d 17-Jun-2009 Douglas Gregor <dgregor@apple.com> Support dependent extended vector types and template instantiation
thereof. Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
4183335fa8bfce8dd2d910dc992dace8c5f66b0d 04-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> More refactoring/cleanup of objc ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
beaaccd8e2a8748f77b66e2b330fb9136937e14c 21-May-2009 Jay Foad <jay.foad@gmail.com> Use v.data() instead of &v[0] when SmallVector v might be empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
390b4cc8b45a05612349269ef08faab3e4688f06 16-May-2009 Mike Stump <mrs@apple.com> Reflow some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
2574a68e5cca0171f1e8c09373cb2f7e612ab77e 15-May-2009 Fariborz Jahanian <fjahanian@apple.com> Don't warn if result/argument type of an implemented
method is a qualified id which conforms to the matching type
of its method declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5d36ac2cc91125134fd8e1f0a0f1c2f888fb0566 12-May-2009 Fariborz Jahanian <fjahanian@apple.com> Method attributes may only be specified on method
declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7aaa409fe0ca54f9bcc69b55e4d8903fca64a76f 08-May-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a bug in my last patch. Order of types reversed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c001e89b920504154bd0b1832e6feacd28fbfa58 08-May-2009 Fariborz Jahanian <fjahanian@apple.com> Refactoring of my last patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4c2743f0afe601b0e8ea7bd9b3cd0fb09083a181 08-May-2009 Fariborz Jahanian <fjahanian@apple.com> More type checking for properties, accessors and
use of dot-syntax expression. This is to match gcc's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
046efd92714dce712ad47bedfbdbb64e6eb35eec 08-May-2009 Mike Stump <mrs@apple.com> Add a warning for a missing copy attribute on a property that is a
block pointer. Radar 6441502


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
cae27c51f0da674cdd3b53b8b2f7ba08c44c54b0 07-May-2009 Fariborz Jahanian <fjahanian@apple.com> a forward class declaration matching a typedef name of a class
refers to the underlying class.
This is radar 6859726. Steve, please read the radar for my rational.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
1c6a3cc88177c67498fccdf14cfdf09959214e41 04-May-2009 Ted Kremenek <kremenek@apple.com> Remove support for ObjCMethodDecl attributes that appear between the
return type and the selector. This is inconsistent with C functions
(where such attributes would be placed on the return type, not the the
FunctionDecl), and is inconsistent with what people are use to seeing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b33f3ad379f497c5fc6d0ada618745dd46d0e717 01-May-2009 Fariborz Jahanian <fjahanian@apple.com> Check for method type conflict between declaration in
class/protocol and implementation which could be
an imm. implementation or down in the inheritance
hierarchy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e2f2c16047a0165cbfbdba84c74bd4fb814d7c3e 30-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Use of super class ivar to synthesize property is back to being error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b27d1174673d457e2ee7906c14a92bba35242cea 30-Apr-2009 Ted Kremenek <kremenek@apple.com> Hook up Sema support for attributes on Objective-C method declarations that
appear between the return type and the selector. This is a separate code path
from regular attribute processing, as we only want to (a) accept only a specific
set of attributes in this place and (b) want to distinguish to clients the
context in which an attribute was added to an ObjCMethodDecl.

Currently, the attribute 'objc_ownership_returns' is the only attribute that
uses this new feature. Shortly I will add a warning for 'objc_ownership_returns'
to be placed at the end of a method declaration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
9cd6f0f58570a98a6d6acee8803c73986c6846b4 30-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Change to warning when property uses an ivar in super class
in an @synthesize diective, as it breaks few projects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
6e5201b71dcf5e98d2ac4e14bebf5b4080120bb6 29-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> use of an ivar specified on a property @synthesize
and found in super class triggers a diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
9a901bb63990574ff0bcc12ff851d7a71cff8ddb 26-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
27a4566734582b81abbf9af8a949a9049098d344 25-Apr-2009 Douglas Gregor <dgregor@apple.com> Fix a pasto in the lookup of instance methods in the global pool

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f0aaf7a59729a4ae0146e3464ee987745be95829 24-Apr-2009 Douglas Gregor <dgregor@apple.com> PCH support for the global method pool (= instance and factory method
pools, combined). The methods in the global method pool are lazily
loaded from an on-disk hash table when Sema looks into its version of
the hash tables.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
516ff43cc4e20b637335d3dfa5b197ca8faa09cb 24-Apr-2009 Douglas Gregor <dgregor@apple.com> Eliminate Sema::ObjCAliasDecls. This is based on Steve's fix, but also
updates name lookup so that we see through @compatibility_alias
declarations to their underlying interfaces.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
a4aa34d9f87decb2ad0e31eb136cda8df174a494 24-Apr-2009 Douglas Gregor <dgregor@apple.com> Fix Objective-C crashes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8b9fb3082bc54cf7ffe6c3772500a73388f53072 24-Apr-2009 Douglas Gregor <dgregor@apple.com> Eliminate Sema::ObjCInterfaceDecls


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8fc463adf0116fdcbff86e9cca11955aad1649fe 24-Apr-2009 Douglas Gregor <dgregor@apple.com> Eliminate Sema::ObjCImplementations, relying instead on name lookup. What's good for uniformity is good for PCH (or is it the other way around?).

As part of this, make ObjCImplDecl inherit from NamedDecl (since
ObjCImplementationDecls now need to have names so that they can be
found). This brings ObjCImplDecl very, very close to
ObjCContainerDecl; we may be able to merge them soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
6e378de1aebdfeb44f2a7677ed207b32b3a41fbf 24-Apr-2009 Douglas Gregor <dgregor@apple.com> Eliminate Sema::ObjCProtocols. Instead, we place ObjCProtocolDecls in
their own namespace (IDNS_Protocol) and use the normal name-lookup
routines to find them. Aside from the simplification this provides
(one less DenseMap!), it means that protocols will be lazily
deserialized from PCH files.

Make the code size of the selector table block match the code size of
the type and decl blocks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
77a6be4826d1752ba834fddbbf3114f70cda2be5 23-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose if an implementation implements a forward class
declaration (and avoid issuing bogus error later on).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
04c5f4f3c0e6e751d34351d1b517fb589232878c 23-Apr-2009 Steve Naroff <snaroff@apple.com> Remove @compatibility_alias regression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8f06f84e8be64962cc478e3e8867336768cac79b 23-Apr-2009 Steve Naroff <snaroff@apple.com> More PushOnScopeChain() FIXME's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
a7503a735d56473a67987880726f8bf731ee3463 23-Apr-2009 Steve Naroff <snaroff@apple.com> Sema::ActOnStartClassInterface(): Use PushOnScopeChains().

This enables class recognition to work with PCH. I believe this means we can remove Sema::ObjCInterfaceDecls and it's usage within Sema::LookupName(). Will investigate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
0468fb99068c40990a3b1451938fee5b90daf941 21-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to diagnose use of objc's @defs in nonfragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
33feeb019a5742b286eededd5446ec0fe87c5a61 20-Apr-2009 Steve Naroff <snaroff@apple.com> Add pch reader/writer support for ObjCContainerDecl, ObjCInterfaceDecl, & ObjCIvarDecl.

Next step: Add selector support to PCHWriter::AddDeclarationName().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
38c5ebd7b1b65304c7b5c7b9bf3f9162df22e77d 19-Apr-2009 Chris Lattner <sabre@nondot.org> add a new Sema::CurFunctionNeedsScopeChecking bool that is used to avoid
calling into the jump checker when a function or method is known to contain
no VLAs or @try blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
50c314cb045fef8d442426deb00b75be6f2a1ce3 15-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to remove a bogus warning which pointed to underlying AST
gen. issue for property in continuation class declared readwrite
but which did not generate the declaration for the setter. Fix also
removed a FIXME and resulted in code cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
12bac2566e3136d4bd9d42e6aabe27e1038f7793 15-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose properties which have no implementations;
either unimplemented setter/getter or no
implementation directive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5466c7b0ca8ce662e2c0bc295cecba2b78d6957d 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Audit __private_extern__ handling.
- Exposed quite a few Sema issues and a CodeGen crash.

- See FIXMEs in test case, and in SemaDecl.cpp (PR3983).

I'm skeptical that __private_extern__ should actually be a storage
class value. I think that __private_extern__ basically amounts to
extern A __attribute__((visibility("hidden")))
and would be better off handled (a) as that, or (b) with an extra bit
in the VarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
29da66ec56b56db03ed4d48be3e1415f2dbf8995 13-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> In objc2's None-Fragile ABI, one cannot use the super class ivar for
setter/getter synthesis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
87454161a6377b573d4fc3ff45e7b3ec193e860c 13-Apr-2009 Steve Naroff <snaroff@apple.com> Change diagnostic as a result of researching <rdar://problem/6779809> missing interface name in "error: cannot declare variable inside a class, protocol or category ''.

Since ObjC 2.0 class "extensions" have a null name, the diagnostic above is actually "correct". Nevertheless, it is confusing. Decided to remove the name entirely (from my perspective, it didn't add any value). Also simplified the text of the diagnostic a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
58fe03bc8083b92b606c31431feb361c45266cc2 12-Apr-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6771034: don't warn on use of forward declared protocol in protocol
list of another protocol definition. This warning is very noisy and GCC doesn't
produce it so existing code doesn't expect it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
d1e0f5a8ec5d5d5770e18b1d1db0bd7b849dc713 11-Apr-2009 Chris Lattner <sabre@nondot.org> improve location info for property stuff. In a property like this:
@property int x;

associate the location of X with the property decl, not the location
of the @. Also, pass this info along to the synthesized ParmVarDecls
so that redefinition and other diagnostics can use it. This eliminates
a fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3aff919532fd807ed678b9cfa4b7eca7b04adcf9 11-Apr-2009 Chris Lattner <sabre@nondot.org> improve the 'conflicting types' diagnostics to include correct location info, now
that it is plumbed through Sema. On a file from growl, we used to emit:

t.mi:107059:1: warning: conflicting types for 'removePluginHandler:forPluginTypes:'
- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {
^
t.mi:105280:1: note: previous definition is here
- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;
^

now we produce:

t.mi:107059:55: warning: conflicting parameter types in implementation of 'removePluginHandler:forPluginTypes:': 'id<NSObject>' vs 'id<GrowlPluginHandler>'
- (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions {
^
t.mi:105280:45: note: previous definition is here
- (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types;
^

We still don't have proper loc info for properties, hence the FIXME.

rdar://6782494



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7db638d1222bfb2517ac54388e83169a4c76cf7e 11-Apr-2009 Chris Lattner <sabre@nondot.org> Set proper location info on objc method arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68877 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f97e8fa2966e3e49eac433336450f24ccbdf8b4a 11-Apr-2009 Chris Lattner <sabre@nondot.org> simplify code to use adjustParameterType, apply objc arg attributes
to their arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
2dd979fbd59938babbed76e2376116511b403c93 11-Apr-2009 Chris Lattner <sabre@nondot.org> Improve the 'cannot pass objc interface by value' diagnostic:
1) improve localizability by not passing english strings in.
2) improve location for arguments.
3) print the objc type being passed.

Before:
method-bad-param.m:15:1: error: Objective-C type cannot be passed by value
-(void) my_method:(foo) my_param
^

after:
method-bad-param.m:15:25: error: Objective-C interface type 'foo' cannot be passed by value
-(void) my_method:(foo) my_param
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e294d3fbaffcbc0cf5f16067ab31d2b2763d25e9 11-Apr-2009 Chris Lattner <sabre@nondot.org> change the interface to ActOnMethodDeclaration to pass down argument
information in a little struct instead of individually. While we're
at it, add per-argument loc info and attribute info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5272b7f6ac343bbfc1638ed414fe474d763b3f88 11-Apr-2009 Chris Lattner <sabre@nondot.org> simplify this code to not bother stripping to canonical types, and
indent code properly


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
0a9217f5462d067435e4fc32307c018350d59d38 11-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Fix another fallout from defining __weak unconditionally.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5a11295a7d8d8899522111668b5973c27ea7c6b2 10-Apr-2009 Ted Kremenek <kremenek@apple.com> Use getDeclName() instead of getIdentifier() (safe against null pointers)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
c8bafd7242763b7029a7bed898690ea44a59ae4a 07-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Now that we have __weak defined as attribute in all modes,
we must not issue gc-specific errors in non-gc mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e2573e529d8630e1586e8fb1230938d6e1d799e5 07-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Warn instead of error on duplicate protocol definitions.
Be kind to so many projects which are doing this (and be
like gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
77c9fd2eee4cdac3c5a38a353788f308990598af 06-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed visibility issues related to objc2's synthesized
ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
50efe0483563b12dc8e005068c85d68dc1f7d9ae 06-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> writable property in a category of class's superclass
makes the property writable in the current class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b072b7125b3e2c03da66179704bff9c16808178a 03-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Real corener case of a method declared in a protocol
used in a class which declares a property of the same
name. This should not result in an unimplemented
method warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
682bf92db408a6cbc3d37b5496a99b6ef85041ec 29-Mar-2009 Chris Lattner <sabre@nondot.org> Push DeclGroup much farther throughout the compiler. Now the various
productions (except the already broken ObjC cases like @class X,Y;) in
the parser that can produce more than one Decl return a DeclGroup instead
of a Decl, etc.

This allows elimination of the Decl::NextDeclarator field, and exposes
various clients that should look at all decls in a group, but which were
only looking at one (such as the dumper, printer, etc). These have been
fixed.

Still TODO:

1) there are some FIXME's in the code about potentially using
DeclGroup for better location info.
2) ParseObjCAtDirectives should return a DeclGroup due to @class etc.
3) I'm not sure what is going on with StmtIterator.cpp, or if it can
be radically simplified now.
4) I put a truly horrible hack in ParseTemplate.cpp.

I plan to bring up #3/4 on the mailing list, but don't plan to tackle
#1/2 in the short term.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
32d3f9cee651b8f7feb34f99ccce00e6fc33d6a0 29-Mar-2009 Chris Lattner <sabre@nondot.org> tighten this up, the decl *must* be a declcontext, no need for the dynamic check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b28317a8e5e0e2953d1e5406d753d6c3c7f1e7d2 28-Mar-2009 Chris Lattner <sabre@nondot.org> Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a
pointer. Its purpose in life is to be a glorified void*, but which does not
implicitly convert to void* or other OpaquePtr's with a different UID.

Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>. Change the
entire parser/sema interface to use DeclPtrTy instead of DeclTy*. This
makes the C++ compiler enforce that these aren't convertible to other opaque
types.

We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc,
but I don't plan to do that in the short term.

The one outstanding known problem with this patch is that we lose the
bitmangling optimization where ActionResult<DeclPtrTy> doesn't know how to
bitmangle the success bit into the low bit of DeclPtrTy. I will rectify
this with a subsequent patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b31cb7f1752ea011fd06ac9574ce24667d11cbdb 21-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Issue error if variables are defined inside an objc class,
category or protocol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
38e24c782c17b6058bf61d635747bbde19fb1bc7 18-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> objc: Implemented variables declared in class interface
whose sema decl is at the translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8af2c16571f3aade6d47ce81fa3857d01d375719 14-Mar-2009 Ted Kremenek <kremenek@apple.com> Make Selector::getIdentifierInfo() private. I took a first attempt at this last
week in:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090302/013580.html

That patch caused the output of the diagnostics to change. Since
'DeclarationName' can already reason about Selectors and the Diagnostics logic
reasons about DeclarationName, there is no additional code needed to get the
diagnostics working by making Selector::getIdentifierInfo() private.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
caaacecb2b64e6d2e402533baffda4cb540f4145 13-Mar-2009 Steve Naroff <snaroff@apple.com> Remove ActiveScope (revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65694 and http://llvm.org/viewvc/llvm-project?view=rev&revision=66741).

Will replace with something better today...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
d42ffbd22fc7eb61321f6a88173ee424991f01c6 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Revert my last couple patches until I can get them to not make the tests fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b9eb3afc9eafbb1c6815c8b63633065f370be6a5 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Teach Diagnostic about Selector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
150ec292a6e7995a711cedbe7a10a25d664a6c6b 07-Mar-2009 Ted Kremenek <kremenek@apple.com> Selector: (changes made after discussing this more with Steve Naroff)
- Make Selector::getAsIdentifierInfo() private. Using IdentifierInfo* in
Selector is an implementation detail that clients shouldn't think about.
- Modify diagnostic emission in Sema::ProcessPropertyDecl to not use
Selector::getAsIdentifierInfo() (which could crash when IdentifierInfo* is
null) and instead use Selector::getAsString().
- Tidy up Selector::getAsString() implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
fbffca65a95e26b198c084a81a33b9cdfcd01101 05-Mar-2009 Steve Naroff <snaroff@apple.com> Tweak diag for <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized property 'sdkPath' must either be named the same as a compatible ivar or must explicitly name an ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
61d6852f67b4416bb96f1613c1aa589c8cbc17db 05-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6144382> [sema] gcc inconsistency w.r.t. forward protocol declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b25df3577cf0560592599609fba7b8ff7557ce84 04-Mar-2009 Chris Lattner <sabre@nondot.org> simplify Sema::AddInstanceMethodToGlobalPool, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f4c00ffdfdaacf0e3f664e5b535191a9efa1443a 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized property 'sdkPath' must either be named the same as a compatible ivar or must explicitly name an ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
15edf0de6b5bc9ae227bcc9658a157ac30efd92e 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6497242> Inherited overridden protocol declared objects don't work.

Change Sema::DiagnosePropertyMismatch() to check for type compatibility (rather than type equivalence, which is too strict).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
ca33129bb28b05938c3e6c9f8a66165b5cceb4dd 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6497608> clang does not catch ivar type mismatches in @implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
78c39c76103a36e37a05b1e40da93850ea64647b 02-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b7f95f5b29ea4ba4231cbcbe581502ece5033795 02-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Check for duplicate declaration of method of a class
in its extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
cddc88800bbd1213ec70ae5153c6a7f2e380fd8d 01-Mar-2009 Chris Lattner <sabre@nondot.org> "This patch uses the new ObjCImplDecl class to merge Sema::ImplMethodsVsClassMethods and Sema::ImplCategoryMethodsVsIntfMethods methods.
And now, when clang check a class implementation to find unimplemented methods, it also checks all methods from the class extensions (unnamed categories).

There is also a test case to check this warning.

This patch contains also a minor update for ObjCImplDecl . getNameAsCString and getNameAsString now returns an empty string instead of crashing for unnamed categories."

Patch by Jean-Daniel Dupas!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
ebf6443a4f493233f7e8d92b3a991848c8b1c00d 28-Feb-2009 Steve Naroff <snaroff@apple.com> Minor name change (move the ObjC prefix to a more appropriate place).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f3cf89737965352ee02026992e2dc735824e185e 28-Feb-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6451399> problems with labels and blocks.

- Move the 'LabelMap' from Sema to Scope. To avoid layering problems, the second element is now a 'StmtTy *', which makes the LabelMap a bit more verbose to deal with.
- Add 'ActiveScope' to Sema. Managed by ActOnStartOfFunctionDef(), ObjCActOnStartOfMethodDef(), ActOnBlockStmtExpr().
- Changed ActOnLabelStmt(), ActOnGotoStmt(), ActOnAddrLabel(), and ActOnFinishFunctionBody() to use the new ActiveScope.
- Added FIXME to workaround in ActOnFinishFunctionBody() (for dealing with C++ nested functions).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
9bc77b2423e75b9361f597d6fa7c024a53e504cd 27-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose gc attribute mismatch of property and its ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
22dc0b04351f5d3feeb6e121f330fb8ae18090e3 26-Feb-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6574319> clang issues error on 'readonly' property with a defaul setter attribute.

Needed to make isPropertyReadonly() non-const (for this fix to compile). I imagine there's a way to retain the const-ness, however I have more important fish to fry.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
1829a6db2ec19e08061f0bb2f4c52a8e5e4efaf0 23-Feb-2009 Chris Lattner <sabre@nondot.org> fix rdar://6611778, a redefinition of an interface was causing an
assertion when the ivars and method list was reset into the existing
interface. To fix this, mark decls as invalid when they are redefined,
and don't insert ivars/methods into invalid decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
ccef371a67756233aa97770e4fccdfa868b3e2d0 20-Feb-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6500554> missing objc error message.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f25df99486d22d03dfde6cfe3a55341c9bfc4493 20-Feb-2009 Chris Lattner <sabre@nondot.org> fix indentation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
89951a86b594513c2a013532ed45d197413b1087 20-Feb-2009 Chris Lattner <sabre@nondot.org> remove some more methods from objc decls, using the iterator
interfaces more consistently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
48f3bb9f780f6e64ab71ba0202ca04b07473805a 18-Feb-2009 Douglas Gregor <dgregor@apple.com> Downgrade complaints about calling unavailable functions to a warning
(as GCC does), except when we've performed overload resolution and
found an unavailable function: in this case, we actually error.

Merge the checking of unavailable functions with the checking for
deprecated functions. This unifies a bit of code, and makes sure that
we're checking for unavailable functions in the right places. Also,
this check can cause an error. We may, eventually, want an option to
make "unavailable" warnings into errors.

Implement much of the logic needed for C++0x deleted functions, which
are effectively the same as "unavailable" functions (but always cause
an error when referenced). However, we don't have the syntax to
specify deleted functions yet :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64955 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
22bd905673a73ccb9b5e45a7038ec060c9650ffe 16-Feb-2009 Chris Lattner <sabre@nondot.org> diagnose uses of deprecated typenames and tags.
We now pass all the deprecation tests in the objc.dg suite.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c7984ddeda4655e3e9e6acf2424acfc55173d5e2 16-Feb-2009 Chris Lattner <sabre@nondot.org> warn about interfaces that inherit from deprecated classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
16b34b416a68be507017051c211c90b246cd5066 16-Feb-2009 Chris Lattner <sabre@nondot.org> warn about categories that implement deprecated interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64670 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
70f1954659b1c0e3e7675f0f688ee0f384846148 16-Feb-2009 Chris Lattner <sabre@nondot.org> early exit on error. This code is creating an invalid decl on error. This is
dubious, but at least mark it as an invalid decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4247c078b92ef853ed7f462d97abcebc999d82c5 16-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Remove an unused variable (which caused a warning).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
bdbde4db74ea9751e02081d720f415eae9718662 16-Feb-2009 Chris Lattner <sabre@nondot.org> code cleanup


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
97a588715d6c896158106d6ca732196d3fee857b 16-Feb-2009 Chris Lattner <sabre@nondot.org> propagate attributes onto property decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
9af5e6737db0af6b9c6a722c55ac43115c14add9 16-Feb-2009 Ben Laurie <benl@google.com> Untabify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
45ce5c38dd347564bea942c5be3b53dd4a6240c7 14-Feb-2009 Chris Lattner <sabre@nondot.org> simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
47b9a1ca55e61e37f5a368740e29de190345acc6 04-Feb-2009 Douglas Gregor <dgregor@apple.com> Some name-lookup-related fixes, from Piotr Rak!

- Changes Lookup*Name functions to return NamedDecls, instead of
Decls. Unfortunately my recent statement that it will simplify lot of
code, was not quite right, but it simplifies some...
- Makes MergeLookupResult SmallPtrSet instead of vector, following
Douglas suggestions.
- Adds %qN format for printing qualified names to Diagnostic.
- Avoids searching for using-directives in Scopes, which are not
DeclScope, during unqualified name lookup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
818cb9eaba6279675af8c3b87c464d21d3796682 04-Feb-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6552648> error: redefinition of 'XCElementAnchorDelegate' as different kind of symbol.

At first glance, this looked like a recent regression (possibly created by http://llvm.org/viewvc/llvm-project?view=rev&revision=63354, which was the only recent change to this section of Sema::ActOnStartClassInterface()). After more investigation, it looks like an edge case bug that we didn't cover in our tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
64650af7cc4352c6c67b9bd1bf8ef3ce7471b910 03-Feb-2009 Douglas Gregor <dgregor@apple.com> Add a macro-based enumeration of all of the Decl nodes (like we do
with Stmt/Expr nodes), and convert some of the more mundane
switch-on-all-decl-kinds uses over to use this new file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4c921ae760cbdd9270c16d48417d7d527eb0ceb8 30-Jan-2009 Douglas Gregor <dgregor@apple.com> Eliminated LookupCriteria, whose creation was causing a bottleneck for
LookupName et al. Instead, use an enum and a bool to describe its
contents.

Optimized the C/Objective-C path through LookupName, eliminating any
unnecessarily C++isms. Simplify IdentifierResolver::iterator, removing
some code and arguments that are no longer used.

Eliminated LookupDeclInScope/LookupDeclInContext, moving all callers
over to LookupName, LookupQualifiedName, or LookupParsedName, as
appropriate.

All together, I'm seeing a 0.2% speedup on Cocoa.h with PTH and
-disable-free. Plus, we're down to three name-lookup routines.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
28372fa7f66e5c4f551f694373cba2aded3aa155 29-Jan-2009 Chris Lattner <sabre@nondot.org> diags moved, so these casts are no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5d2ff63254bf1c3d3ca6844c96f3bfd88561cc7c 29-Jan-2009 Douglas Gregor <dgregor@apple.com> Suppress a warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
500d3297d2a21edeac4d46cbcbe21bc2352c2a28 29-Jan-2009 Chris Lattner <sabre@nondot.org> move library-specific diagnostic headers into library private dirs. Reduce
redundant #includes. Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3e8ffd2e96e7842245f1ae0cb631eba75da1a6f7 29-Jan-2009 Steve Naroff <snaroff@apple.com> Refactor Sema::LookupDecl() into 2 functions: LookupDeclInScope() and LookupDeclInContext().

The previous interface was very confusing. This is much more explicit, which will be easier to understand/optimize/convert.

The plan is to eventually deprecate both of these functions. For now, I'm focused on performance.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
20c6b3b85e186cd52d5d99489132d71d498159eb 27-Jan-2009 Chris Lattner <sabre@nondot.org> Split the single monolithic DiagnosticKinds.def file into one
.def file for each library. This means that adding a diagnostic
to sema doesn't require all the other libraries to be rebuilt.

Patch by Anders Johnsen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
acdc33b1ff74744e05d492a05053cdc4f4131086 19-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Type of property and its ivar is more restrictive
that rules for assignment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
9bae5e7af04e44b4d333a2c7ba22608d0594ff9f 17-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Diagnose when method parameter is an object.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
482b77d1cb4ca08391d1f749436f092a4cc24427 13-Jan-2009 Douglas Gregor <dgregor@apple.com> Cleanup DeclContext::addDecl and DeclContext::insert interface, from Piotr Rak

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
6037fcba3431b47de1a994c9b286feac17894eff 09-Jan-2009 Douglas Gregor <dgregor@apple.com> Replace DeclContext's vector of ScopedDecl pointers with a linked list
of ScopedDecls (using the new ScopedDecl::NextDeclInScope
pointer). Performance-wise:

- It's a net win in memory utilization, since DeclContext is now one
pointer smaller than it used to be (std::vectors are typically 3
pointers; we now use 2 pointers) and
- Parsing Cocoa.h with -fsyntax-only (with a Release-Asserts Clang)
is about 1.9% faster than before, most likely because we no longer
have the memory allocations and copying associated with the
std::vector.

I'll re-enable serialization of DeclContexts once I've sorted out the
NextDeclarator/NextDeclInScope question.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
439c65892cc8629bbf541e0b8bda6b64cbcc4e6b 09-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Adding support for ObjC methods which have c-style
parameter list. This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4fb78c6d62a325f949e002a6bb3af4f6f33608a9 08-Jan-2009 Steve Naroff <snaroff@apple.com> Move FIXME to a better location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61937 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
305c658ebce84bb9833fc0e7675554656453b8e8 08-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Objc's compatibility-alias semantics and code
gen issue fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61901 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
ce35607c282c845b3285d0f6e106489d8bbeba13 07-Jan-2009 Douglas Gregor <dgregor@apple.com> Allow Objective-C entities to be declared within a transparent context
nested in the translation unit. This fixes <rdar://problem/6476070>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
fc820a4394a33e4fccfd8283909d425708311d41 29-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Remove hasKind(). Use existing getKind().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
804058ece0d8f692faac8518ce4d98975ba57ac2 22-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to remove bogus warning in case of @dynamic
property in a category and to issue diagnostics
for mismatch method in some other cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4306d3cb9116605728252e2738df24b9f6ab53c3 21-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Finish up saving original parameter type and
using it in ObjC's method parameter encoding.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
cc98eac383718899462b9b1361c46eea8dddfb2b 17-Dec-2008 Chris Lattner <sabre@nondot.org> Move the other Sema::ActOnLinkageSpec to SemaDeclCXX.
Move Sema::ActOnDefs to SemaDeclObjC


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
bc1c877fe28fb6a825f0b226a0a2da99e713ea03 17-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Semantics of @protocol attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
82b4e768d38c12ceba7db23a96e8d845e00fdeb7 16-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Silence a couple more operator precedence warnings; this shouldn't
change the semantics. Please correct this if the precedence was
actually supposed to be something different.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
105ec4bb8e969eee18b4c2f503b46b17f3e2f364 16-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to check for ObjC's property type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
6082c62125688a2901c11b932a7bb47ca83bc298 09-Dec-2008 Steve Naroff <snaroff@apple.com> Sema::ActOnMethodDeclaration(): Make sure we perform the default function/array conversion for parameter types.

This fixes <rdar://problem/6424064> checker on xcode: (possible bad AST) can the type of a method parameter really have "isFunctionType() == true"?
and http://llvm.org/bugs/show_bug.cgi?id=2997.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
ba45da8328b97fe7c9f4d92e377bd3e586b9a79f 08-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Changed 'readonly' 'retain/copy' diagnostics into
warning as it is allowed in gcc and will break projects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
9bfb2a2cbe3931db9785705c6d476c3089eaeed6 08-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Since we do not allow a readonly property to be 'copy'retain', we
must allow the continuation class to extend it to a 'readwrite'
and 'copy/retain'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f57172b24f08a68d179675989813d5479dc87829 08-Dec-2008 Douglas Gregor <dgregor@apple.com> Move Sema::isTemplateParameterDecl to Decl::isTemplateParameter, where it belongs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5dd412901196305e7c6dd053880f711ca5419763 07-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Setters returning a typedef of 'void' should not cause error.
Bug reported by Chris L.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
196d0ed5e13bbea4cbe327060eb3cba7fa83898f 06-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Improve error reporting of property and setter/getter
type mimatches.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
ec604c8e1f6a76a413c38179a2eeeee37fc7f886 06-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Check for correct'void' return type for setter methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
77e14bd3a714be42dbe1ab90a37b5832740b6df2 06-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Changed a 'FIXME' into new comment. Added a test case
testing declaration of properties in categories.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60625 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
567c8df3646208e0a5816c57191ca36930f50ed3 06-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to diagnose a variety of misuse of property
attributes. Example would be, readonly, assign or
assign, copy, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
8daab970b80ed2e751fc88327180acbeff1dbb9c 05-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> (instance/class) Method type checking between class and its implementation.
(instance/class) Method type checking between category and its implementation.
And a test case for all.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
72c3f314d92d65c050ee1c07b7753623c044d6c7 05-Dec-2008 Douglas Gregor <dgregor@apple.com> Representation of template type parameters and non-type template
parameters, with some semantic analysis:
- Template parameters are introduced into template parameter scope
- Complain about template parameter shadowing (except in Microsoft mode)

Note that we leak template parameter declarations like crazy, a
problem we'll remedy once we actually create proper declarations for
templates.

Next up: dependent types and value-dependent/type-dependent
expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
de7394157c3f83af55053128178aa71bdb08101c 05-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Patch for diagnosing type mismatch between
methods in class and its implementation.
This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
06de37bade11b2d4187a1e4f74d0dcf2a72dda39 04-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Output better diagnostics for continuation class
property attribute mis-specification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f3cd3fd859120d58f745ba545c8da808e12a39ac 02-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> More type-checking of setter/getter methods. This is still
work in prgress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
b16308f1b37237244022d06a467db14efb01b7c3 26-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Removed a FIXME. Added a test case for anonymous category.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8cf0bb3c2a798ce3acacaac2d3178648cd4c65c6 26-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Set default property attributes on each property.
Implemented anonymous category (also know as continuation class)
used to override main class's property attribute. This is work in
propgress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e793a6ec1617376c7c320dc0b9808dce5450d726 24-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to remove bogus waring when a property declaration
is imported from a protocol into the implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
d9d22dd9c94618490dbffb0e2caf222530ca39d3 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of
uses of getName() with uses of getDeclName(). This upgrades a bunch of
diags to take DeclNames instead of std::strings.

This also tweaks a couple of diagnostics to be cleaner and changes
CheckInitializerTypes/PerformInitializationByConstructor to pass
around DeclarationNames instead of std::strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
1326a3dcbbf04b126396d3e1a739ee437ca4398c 24-Nov-2008 Chris Lattner <sabre@nondot.org> convert some more warnings to NOTEs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8b265bd5eba1394273693e6705a43adac6b6aa2f 24-Nov-2008 Chris Lattner <sabre@nondot.org> remove warn_previous_declaration



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5f4a6829dc58cab2f76e2b98492859aa3b91e3f2 24-Nov-2008 Chris Lattner <sabre@nondot.org> Make all the 'redefinition' diagnostics more consistent, and make the
"previously defined here" diagnostics all notes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b8b96aff63e24ff1509f112de871f697aaea55f9 23-Nov-2008 Chris Lattner <sabre@nondot.org> make some objc redefinition warnings more consistent: call definitions
"definitions", not declarations. Point out the location of the
original definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
6ff0fc341f6d66b523d63b5d3fdfe00f6d4254fd 23-Nov-2008 Chris Lattner <sabre@nondot.org> Tweak duplicate category diagnostic to work like the duplicate protocol diagnostic.
Also, point out where the previous decl was. This unxfails two tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
08631c5fa053867146b5ee8be658c229f6bf127c 23-Nov-2008 Chris Lattner <sabre@nondot.org> Convert IdentifierInfo's to be printed the same as DeclarationNames
with implicit quotes around them. This has a bunch of follow-on
effects and requires tweaking to a whole lot of code. This causes
a regression in two tests (xfailed) by causing it to emit things like:

Line 10: duplicate interface declaration for category 'MyClass1' ('Category1')

instead of:

Line 10: duplicate interface declaration for category 'MyClass1(Category1)'

I will fix this in a follow-up commit.

As part of this, I had to start switching stuff to use ->getDeclName() instead
of Decl::getName() for consistency. This is good, but I was planning to do this
as an independent patch. There will be several follow-on patches
to clean up some of the mess, but this patch is already too big.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5dc266abe0e8de69788ba67e38047a919f4bc383 20-Nov-2008 Chris Lattner <sabre@nondot.org> remove another old Diag method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
d3a94e24ddf3fb90de76b17bd176d9ed61e66f2c 20-Nov-2008 Chris Lattner <sabre@nondot.org> remove another old-school Diag method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3c73c41cefcfe76f36b7bed72c9f1ec195490951 19-Nov-2008 Chris Lattner <sabre@nondot.org> stop calling II::getName() unnecesarily in sema


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
dcd5ef12488e4c7ea844327835896ca86b609a97 19-Nov-2008 Chris Lattner <sabre@nondot.org> remove one more old-style Diag method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
fa25bbb351f4fdd977f51254119cdfc2b525ce90 19-Nov-2008 Chris Lattner <sabre@nondot.org> Switch several more Sema Diag methods over. This simplifies the
__builtin_prefetch code to only emit one diagnostic per builtin_prefetch.
While this has nothing to do with the rest of the patch, the code seemed
like overkill when I was updating it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c9c7c4e06bba5dce053162ea1ead5743d7bba35b 18-Nov-2008 Chris Lattner <sabre@nondot.org> start converting Sema over to using its canonical Diag method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
cfe8bf31ad61a16458d5970734d4a300a7bd9b0a 18-Nov-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6329769> [sema] crash on duplication definition of interface with protocols.

As soon as we detect duplicate interfaces, discontinue further semantic checks (returning the original interface).

This is now consistent with how we handle protocols (and less error prone in general).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
15281450f512b7d554858e4d17fca00bfc442a07 04-Nov-2008 Anders Carlsson <andersca@mac.com> Make it an error if an Objective-C declaration is not in the global scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
6f5f41c501d5a4546809ec4a2d39245b66e60408 21-Oct-2008 Steve Naroff <snaroff@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
fe6b0dc94a5279f33aba9a3bc0237c9841be3d43 21-Oct-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6261178> clang-on-xcode: [sema] multiple method warning is over enthusiastic.
Fix <rdar://problem/6265257> warnings for ambiguous message send swamp other warnings.

Reworked Sema::MatchTwoMethodDeclarations() to optionally match based on method size and alignment (the default in GCC). Changed Sema::LookupInstanceMethodInGlobalPool() to use this feature.

Added -Wno-struct-selector-match to driver, however didn't hook it up yet. Added a FIXME that says this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4fa4ab67dd9aa12752e1fa1421d9f4f7c937dec7 16-Oct-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6239726> Parser rejects: type of property 'list' does not match type of ivar
and
http://llvm.org/bugs/show_bug.cgi?id=2893


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
037cda5282e73f30bb09fa316047554b1af1e2ef 30-Sep-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6191148> [sema] Objective-C method lookup (at global scope) fails to handle overloaded selectors properly.

Long standing bug in Sema::ActOnInstanceMessage(). We now warn when messaging an "id" with multiple method signatures in scope. The diags are a little verbose, however they can be streamlined if necessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3ce52d65339c49048ddad5080a0ea62e8ce7778c 30-Sep-2008 Steve Naroff <snaroff@apple.com> Improved fix for <rdar://problem/6247781> Parser rejecting properly mismatched properties.
Needed to make sure the relaxed type checking only applies to "readonly" properties.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
fbbe0ac428f804184c1b7c24723dc6cebbe11d90 30-Sep-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6247781> Parser rejecting properly mismatched properties.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56821 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
5e0a74fbf478da0dfe746b9d9c917cff37ae5175 29-Sep-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6253149> property declaration doesn't declare getter and setter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e84a864a7871243d7c60441f399a309dea076f5c 28-Sep-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6252129> implementation of method in category doesn't effectively declare it for methods below.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
246e70f69cb8aeb67225c54690f1c6b25abd5a86 26-Sep-2008 Daniel Dunbar <daniel@zuster.org> Parser support for prefix __attribute__ on @protocol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
3568249c2d72d58b835a22d9186f5a6b4fc4bcd6 26-Sep-2008 Daniel Dunbar <daniel@zuster.org> Sema support for format and noreturn attributes on Objective-C methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
95e61fb7cdd1becf956f897f90abffd8b70575de 23-Sep-2008 Daniel Dunbar <daniel@zuster.org> Implement type checking of Objective-C property attributes.
- readonly and readwrite are mutually exclusive.
- assign, copy, and retain are mutually exclusive.
- copy and retain are invalid on non-object types.
- Warn about using default 'assign' property on object types
(attempting to follow gcc behavior).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7ad1b1fa075e5cd4160d5b357b2a8d3f8a131984 04-Sep-2008 Daniel Dunbar <daniel@zuster.org> Prevent invalid warnings about incomplete implementations for methods
which are inherited from base clases or protocols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b20ef3e3fbe0fabe213dc0149011e9f0d751a3a4 27-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add synthesized property methods to protocols and categories in Sema.

- It is not clear that this is the right approach, but this is at
least consistent with how interfaces are handled.

- This means NeXT now emits the correct metadata for properties in
protocols.

- This currently introduces a spurious warning involving inherited
properties in protocols or categories; however, it also fixes some
situations where we were failing to emit a warning. I will scrub
this code tomorrow and fix this issue as well as number of other
missed warnings / error situations that appear to exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
451318c08a6342c10b8986060386fd9274418437 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> 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@55356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
f11b5088ec16b27d526489b10da20273eb268975 13-Aug-2008 Steve Naroff <snaroff@apple.com> Sema::ActOnStartProtocolInterface(): Make sure the protocol decl has a valid start location.

The following case resulted in an invalid start location:

// start location not being set for ObjCProtocolDecl AST (when a forward reference is in scope).
@protocol Buggy;

@protocol Buggy
@optional
- whatever;
@end



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54740 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
acc5f3e42334525bf28c86471551f83dfce222d5 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Kill unnecessary #includes in .cpp files. This is an automatic
sweep so some things removed are actually used, but happen to be
included by a previous header. I tried to get rid of the obvious
examples and this was the easiest way to trim the #includes in one
fell swoop.
- We now return to regularly scheduled development.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
12bc692a78582f1cc32791325981aadcffb04c5e 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Minor #include cleaning
- Drop TokenKinds.h from Action.h
- Move DeclSpec.h from Sema.h into individual Sema .cpp files


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54625 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
1b63eef830b7a2501f1ab8e8fa38068e5e07ed32 27-Jul-2008 Chris Lattner <sabre@nondot.org> remove two uses of getCanonicalType I missed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b77792eabf5882cf9af8cc810599b20432fda6c2 27-Jul-2008 Chris Lattner <sabre@nondot.org> change more instances of QualType::getCanonicalType to call
ASTContext::getCanonicalType instead (PR2189)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
717250a2052ea65d95405127d4e5836a564dad18 26-Jul-2008 Chris Lattner <sabre@nondot.org> remove a helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
06036d3709955a53297b4cbe14e20db88f321470 26-Jul-2008 Chris Lattner <sabre@nondot.org> Pull protocol resolution of out ActOnStartClassInterface, this is also the
last client of the old ParseObjCProtocolReferences, so it also removes it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54094 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
6bd6d0b9d8944c5e192097bef24f2becb83af172 26-Jul-2008 Chris Lattner <sabre@nondot.org> refactor protocol resolution out of ActOnStartCategoryInterface


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e13b9595dc1e2f4288bec34f3412359f648e84a5 26-Jul-2008 Chris Lattner <sabre@nondot.org> pull protocol resolution out into ActOnStartProtocolInterface.
This temporarily duplicates ParseObjCProtocolReferences, but it
will be removed in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
eacc39212e5960b2680067c006384c2e4804873a 26-Jul-2008 Chris Lattner <sabre@nondot.org> simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e281c86515cca9162170ca5d6ede198acf343428 26-Jul-2008 Chris Lattner <sabre@nondot.org> remove duplicate error message.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
394f3f483fa4e7b472630cfcd03f7840520958c5 25-Jul-2008 Steve Naroff <snaroff@apple.com> Move fix in r54013 from the parser to sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
7caeabd868d46cf4e68478c6e9136dae4e735d21 22-Jul-2008 Chris Lattner <sabre@nondot.org> minor cleanup to the actions interface to pass around SmallVectorImpl instead
of a specific smallvector size.

Fix protocol lists to pass down proper location info, so we get diagnostics
like this:

t.m:3:35: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^

instead of this:

t.m:3:44: error: cannot find protocol definition for 'NSCopying', referenced by 'NSWhatever'
@interface NSWhatever : NSObject <NSCopying>
^


Add a new IdentifierLocPair typedef which is just a pair<IdentifierInfo*, SourceLocation>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
964c27c66c18f373fc91a60e9bf2c3d7c61522d1 21-Jul-2008 Chris Lattner <sabre@nondot.org> add forward definition protocols to the protocol list for a class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
919d87d4eef4126ad6d7da1762c247ab0b5ca05b 21-Jul-2008 Chris Lattner <sabre@nondot.org> references to completely undeclared protocols should be errors.
References to forward definitions should be warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
e8f0d3035886e2bba5833d8764e262ece18c7abd 21-Jul-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change 'MDecl' to 'MD' to fix redefinition compiler error in MSVC++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
fe5042e287352d00db89508bf3c1373cc44b85db 05-Jul-2008 Seo Sanghyeon <sanxiyn@gmail.com> Fix warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
53d0ea5f5bfa647ec23418bf3a3b7c183b51e4bd 28-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Replace CurFunctionDecl and CurMethodDecl with methods getCurFunctionDecl() and getCurMethodDecl() that return the appropriate Decl through CurContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
72fd336721bef3694ab2679f8a460bf985b1230d 25-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> The assert at Sema::ObjCActOnStartOfMethodDef should check CurMethodDecl instead of CurFunctionDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
4111024be81e7c0525e42dadcc126d27e5bf2425 17-Jun-2008 Chris Lattner <sabre@nondot.org> Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.
Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c7333881dcd00be87814d03c349dd96c815f2f05 06-Jun-2008 Steve Naroff <snaroff@apple.com> Second half of "fix" for <rdar://problem/5986085> clang on xcode: error: redefinition of 'XCElementToggler' as different kind of symbol


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
d100c809314b5c030272c7a7112606095a859434 05-Jun-2008 Steve Naroff <snaroff@apple.com> Fixed a recent test regression from last night (r51976).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e2af8b16cb66b59ac3570c5561289469bd852699 05-Jun-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/5986833> clang on xcode: incompatible type returning 'void', expected 'int'.

- Changed Sema::ObjCActOnStartOfMethodDef() to more accurately type "self" in factory methods.
- Changed Sema::ActOnInstanceMessage() to use the new type to restrict the lookup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
74199b6507ff0094b74841620063d88c9669e2d7 05-Jun-2008 Steve Naroff <snaroff@apple.com> Fix trivial crasher and downgrade an error to warning (to match GCC).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8442b5cdb76cef3ad88e32d41750914c7b77f588 23-May-2008 Steve Naroff <snaroff@apple.com> Make sure the source location for @property points the the @-sign (not the decl spec).
Also added a FIXME related to how we represent @properties in the ObjCInterfaceDecl AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
5251e130a23d997f7c0dfdc250cdc41f179e5bed 06-May-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to refactor setter/getter names of property attributes into Selector
(was IdentifierInfo * before). This will make method declartations whole
lot easier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
3435096781465f6b8e69de4b35d9dd3a94a76468 01-May-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to match and issue diagnostics on property type mismatch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
02edb98b457c1be3fabe63f7390fe75fd6689def 01-May-2008 Fariborz Jahanian <fjahanian@apple.com> More ObjC2 property semantics work. Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
642e38baaeedb1a35c36df02a1ac57002a43a694 27-Apr-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use PushOnScopeChains to introduce a decl into scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b5e0224173058c6fd5272d86bf251628c38b2513 24-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Patch to diagnose inconsistancies between properties declared in current and
its super class. This patch is incomplete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
6cdf16d61de193e0596c3c2cec02e4227212986a 21-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> More semantics checks of properties. Property implementation can implicitly use
ivar of same name.
Better diagnostics to bring home this point.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
c35b9e4e2efad727538c848cf30d4b0eb1031dc9 21-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Support for @dynamic AST build.
More property semantics checking.
First test case for ObjC2's property implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
5833b901d02e628c9bcdb1c59efcc100a1faecad 18-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Fixed a bug in categories and properties.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
f624f8186d8fe474350051c6d3f00b2c204fbeae 18-Apr-2008 Fariborz Jahanian <fjahanian@apple.com> Initial work for property implementation declarations.
Mostly semantic checking in this patch. This is on going
and incomplete.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
7f925cc1071117ebe3191db33bbdfd706af297e9 11-Apr-2008 Chris Lattner <sabre@nondot.org> Switch sema to maintaining its own scope chain information for variable
shadowing, instead of threading it through the AST. This patch contributed
by Argiris Kirtzidis!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8123a95c33b792d35c2e4992ba6e27882748fb0d 10-Apr-2008 Chris Lattner <sabre@nondot.org> Several improvements from Doug Gregor related to default
argument handling. I'll fix up the c89 (void) thing next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
04421087832a031c90bd58f128c7c0e741db8dd2 08-Apr-2008 Chris Lattner <sabre@nondot.org> Add support for C++ default arguments, and rework Parse-Sema
interaction for function parameters, fixing PR2046.

Patch by Doug Gregor!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
8bcfc5bef434d7052e28d0ce45182855659ebd3d 07-Apr-2008 Chris Lattner <sabre@nondot.org> remove the Decl::getCanonicalType() method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
3110251f13981689f384eb3c0aba2afffea18d9d 02-Apr-2008 Steve Naroff <snaroff@apple.com> Change ObjCInterfaceDecl to inherit from NamedDecl (not TypeDecl). While ObjCInterfaceDecl is arguably a TypeDecl, it isn't a ScopedDecl. Since TypeDecl's are scoped, it makes sense to simply treat them as NamedDecl's. I could have fiddled a bit more with the hierarchy (in terms of creating a non-scoped TypeDecl), however this probably isn't worth the effort.

I also finished unifying access to scope decl change by converting Sema::getObjCInterfaceDecl() to use Sema::LookupDecl(). This is much cleaner now:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
b327ce02959d4e6224732e1c362e7f8e0688581f 02-Apr-2008 Steve Naroff <snaroff@apple.com> Two changes to Sema::LookupDecl() interface.
(1) Remove IdLoc (it's never used).
(2) Add a bool to enable/disable lazy builtin creaation (defaults to true).

This enables us to use LookupDecl() in Sema::isTypeName(), which is also part of this commit.

To make this work, I changed isTypeName() to be a non-const member function. I'm not happy with this, however I fiddled with making LookupDecl() and friends const and it got ugly pretty quickly. We can certainly add it back if/when someone has time to fiddle with it. For now, I thought this simplification was more important than retaining the const-ness.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp
e8043c39176e7f253fbd92982b077eca6bf2fd59 02-Apr-2008 Steve Naroff <snaroff@apple.com> Fairly large "cleaup" related to changing ObjCCompatibleAliasDecl superclass (to inherit from NamedDecl, instead of ScopedDecl).

- Added a DenseMap to associate an IdentifierInfo with the ObjCCompatibleAliasDecl.
- Renamed LookupScopedDecl->LookupDecl and changed it's return type to Decl. Also added lookup for ObjCCompatibleAliasDecl's.
- Removed Sema::LookupInterfaceDecl(). Converted clients to used LookupDecl().
- Some minor indentation changes.

Will deal with ObjCInterfaceDecl and getObjCInterfaceDecl() in a separate commit...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
439e71f4be0148101281f72f10c9f8bf743e78bd 16-Mar-2008 Chris Lattner <sabre@nondot.org> fix a crasher where an invalid program that multiply defined
a protocol could smash more references in than are allocated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
58cce3b0dcbdcc95b7e713795834b4cb2c8a008a 16-Mar-2008 Chris Lattner <sabre@nondot.org> Make the parameter count of ObjCMethodDecl unsigned, you
can't have negative arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp
bda0b626e74513950405c27525af87e214e605e2 16-Mar-2008 Chris Lattner <sabre@nondot.org> Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it. This follows the main
llvm tree, and allows the libraries to be built in parallel. The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in. This speeds
up parallel builds, particularly incremental ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaDeclObjC.cpp