History log of /external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

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

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Sema/SemaExprObjC.cpp
ce41d4e4cc9bc0dd7227938fa78f2744775322eb 19-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC objc_bridge. Minor refactoring.
// rdar://15454846


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
3daade9020b55e5369256b6536e6c2f6f7a15060 19-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC 'objc_bridging'. Assorment of improvements
per Doug/Jordan comments. // rdar://15454846.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
0f3bb9eb07a0cfd49929ca0d70bbe13b0aa74aff 19-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC ARC. Adopt objc_bridge attribute
on struct/union/class instead of typedef of
such types. // rdar://15454846


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
00be52d19eba3aaa3a154d8cdf4d47240e0dc7d0 17-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC ARC. More validation of toll-free bridging of
CF objects with objc_bridge'ing annotaiton.
// rdar://15454846


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
749152bf05e859596895034acddc4188ed23eeb3 16-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC ARC. Validate toll free bridge casting
of ObjectiveC objects to CF types when CF type
has the objc_bridge attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
9571ab16538ea5fb8b405b74a1683b5c5880637c 16-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjetiveC ARC. Start diagnosing invalid toll free bridging.
// rdar://15454846.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
4b777c05fc287830af01e7c2dfebe7a86f13b260 16-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC ARC. Only briding of pointer to struct CF object is allowed.
Improve on wording on illegal objc_bridge argumment.
// rdar://15454846


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
e78728a6a6b624ad39a1accf297c773a1e427ba4 15-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC ARC. Lookup type associated with objc_bridage at
the point of CF object type-cast and issue diagnostic
if it is not a valid ObjectiveC class. // rdar//15454846.
This is wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
1ce550906a9163fdf4d174a2f4ed594aa18d75ac 07-Nov-2013 Douglas Gregor <dgregor@apple.com> Re-instate contextual conversion to Objective-C pointers in message sends.

When performing an Objective-C message send to a value of class type,
perform a contextual conversion to an Objective-C pointer type. We've
had this for a long time, but it recently regressed. Fixes
<rdar://problem/15234703>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
d9553e35e1e3af6fc4ca817b169dc796a5b54bcd 01-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC. Define a new cc1 flag
-fobjc-subscripting-legacy-runtime which is off
by default and on only when using ObjectiveC
legacy runtime. Use this flag to allow
array and dictionary subscripting and disallow
objectiveC pointer arithmatic in ObjectiveC
legacy runtime. // rdar://15363492


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
a18829860c8b186d3a7f6a4ba83e21e9cbbffac1 10-Oct-2013 Ted Kremenek <kremenek@apple.com> Refine string literal concatenation warning within an NSArray literal to not warn when the literal comes from a macro expansion. Fixes <rdar://problem/15147688>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
2b17b472d2f503ee61c460ca23f226c2aebcdd62 27-Sep-2013 Kaelyn Uhrain <rikka@google.com> Cache the location of failed typo corrections so that typo correction
isn't repeatedly attempted for the same identifier at the same location.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
ecf119c68b9f20f022965fb4875f3fa1d4ffef70 19-Aug-2013 Robert Wilhelm <robert.wilhelm@gmx.net> Omit llvm:: before makeArrayRef. We have using directive in this file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
dc25f8cf9e14b424708af52786af7fcf26445dee 14-Aug-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC [QoI] issue warning if an element of an nsarray
expresison is a concatenated nsstring element.
// rdar://14303083


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
01ad048b70508bf21174cd25512b57f87b7c57a6 31-Jul-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC ARC: Do not issue bridge cast diagnostic when
passing a retainable object arg to a CF audited function
expecting a CF object type. Issue a normal type mismatch
diagnostic. This is wip // rdar://14569171


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
80e8ea92d6dcaa05165dcb4730485db82dcd4629 08-Jun-2013 Adrian Prantl <aprantl@apple.com> address some comments on r183474:
- factor the name construction part out from constructSetterName
- rename constructSetterName to the more appropriate constructSetterSelector

no functionality change intended.
rdar://problem/14035789

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
14040142a3b3c1029092bc1f7c51e347c3fa8f89 15-May-2013 Fariborz Jahanian <fjahanian@apple.com> improve of note message and minor refactoring of my last
patch (r181847).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
9f00b1d3962147a2fe049b8b45f70680bc12fbc1 15-May-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C [diagnostics] [QOI], when method is not
found for a receiver, note where receiver class
is declaraed (this is most common when receiver is a forward
class). // rdar://3258331


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
15f92bad58c8650b1306729744b1a1230197497a 10-May-2013 Hans Wennborg <hans@hanshq.net> Add support for __wchar_t in -fms-extensions mode.

MSVC provides __wchar_t. This is the same as the built-in wchar_t type
from C++, but it is also available with -fno-wchar and in C.

The commit changes ASTContext to have two different types for this:

- WCharTy is the built-in type used for wchar_t in C++ and __wchar_t.

- WideCharTy is the type of a wide character literal. In C++ this is
the same as WCharTy, and in C it is an integer type compatible with
the type in <stddef.h>.

This fixes PR15815.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
416c9b318e0100729a803e747736e7c968be69c9 10-May-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize Sema::CheckMessageArgumentTypes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
9e00f12a2558bc4af77bc2e4171572052ea7d9a2 09-May-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize some SemaOverload methods

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
287f24d3991994b9a263af9e2a873f4feadfb8fa 05-May-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize Sema::CheckObjCMethodCall

Patch by Robert Wilhelm.


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

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
1f78a50f8aee58f8e07f6307f4b8d0b1742e9a2b 03-May-2013 Dmitri Gribenko <gribozavr@gmail.com> ArrayRef'ize InitializationSequence constructor and InitializationSequence::Diagnose()

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f5ebf9bf1df10ac15ba32a4b24dfe171b7848c58 03-May-2013 John McCall <rjmccall@apple.com> Correctly emit certain implicit references to 'self' even within
a lambda.

Bug #1 is that CGF's CurFuncDecl was "stuck" at lambda invocation
functions. Fix that by generally improving getNonClosureContext
to look through lambdas and captured statements but only report
code contexts, which is generally what's wanted. Audit uses of
CurFuncDecl and getNonClosureAncestor for correctness.

Bug #2 is that lambdas weren't specially mapping 'self' when inside
an ObjC method. Fix that by removing the requirement for that
and using the normal EmitDeclRefLValue path in LoadObjCSelf.

rdar://13800041

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f4d02398936c0fdc9fe981348519fbc323f24ad0 01-May-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Point diagnostics that complain about a use of a selector in an objc message, to the selector location.

Previously it would point to the left bracket or the receiver, which can be particularly
problematic if the receiver is a block literal and we end up point the diagnostic far away
for the selector that is complaining about.

rdar://13620447

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
6fc9e7ad3576dcbee3028a42ef5dac931df8754c 11-Mar-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: When using super.prop, property should be
looked up the current class's super class.
// rdar://13349296


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
48f904271effd381ec3c1ae33b97d1ec7d95860a 04-Mar-2013 John McCall <rjmccall@apple.com> Centralize and refine the __unknown_anytype argument rules
and be sure to apply them whether or not the debugger gave
us a method declaration.

rdar://12565338

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
2fbe92cc2464c77825209df9a262d9d13e5ba64c 01-Mar-2013 John McCall <rjmccall@apple.com> Perform the receiver-expression transformations regardless of
whether we already have a method. Fixes a bug where we were
failing to properly contextually convert a message receiver
during template instantiation.

As a side-effect, we now actually perform correct method lookup
after adjusting a message-send to integral or non-ObjC pointer
types (legal outside of ARC).

rdar://13305374

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f799ae1afb897151a84a7170951e367d8307ae04 22-Feb-2013 Fariborz Jahanian <fjahanian@apple.com> objective-C arg: provide fixit support when
c++'s named cast need be replaced for bridge casting.
// rdar://12788838


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f0b1a0ee4787cd60a34951950baa6dd7d3d53a64 22-Feb-2013 Fariborz Jahanian <fjahanian@apple.com> objective-C arc: Diagnostic can not say to use bridge
casts with c++ named casts. Change notes to say use
bridge with c-style cast instead. // rdar://12788838


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
dc84cd5efdd3430efb22546b4ac656aa0540b210 20-Feb-2013 David Blaikie <dblaikie@gmail.com> Include llvm::Optional in clang/Basic/LLVM.h

Post-commit CR feedback from Jordan Rose regarding r175594.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
db546fa2ce65dd2e275fc3fdee961767d53f77cf 15-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix crash-on-invalid where a ParenListExpr shows up as a message receiver
while trying to do error recovery.

rdar://13207886

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
3548068c22f809e5bc64b83d2c3622018469256c 22-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> Small code change to improve performance
in my last patch, suggested by Argyrios.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
48f3cc2b2be1d32df14234904539b34e6e387e4a 22-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> objectiveC (take two): don't warn when in -Wselector mode and
an unimplemented selector is consumed by
"respondsToSelector:". // rdar://12938616


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f11ccc1cbb26cacac36abebe6ce9add43bf32585 21-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> objectiveC: don't warn when in -Wselector mode and
an unimplemented selector is consumed by
"respondsToSelector:". // rdar://12938616


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
84c7519a3865a04f631bc8ddfb8372223d96acfc 28-Nov-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C arc: Underline the selector when issuing
arc specific diagnostic on the selector. This is objc-arc
part of // rdar://11303469


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
b8a8de316dade43fff95d7bfd2cfaa367f53faea 14-Nov-2012 John McCall <rjmccall@apple.com> Accept and pass arguments to __unknown_anytype in argument
positions of Objective-C methods.

It is possible to recover a lot of type information about
Objective-C methods from the reflective metadata for their
implementations. This information is not rich when it
comes to struct types, however, and it is not possible to
produce a type in the debugger's round-tripped AST which
will really do anything useful during type-checking.
Therefore we allow __unknown_anytype in these positions,
which essentially disables type-checking for that argument.
We infer the parameter type to be the unqualified type of
the argument expression unless that expression is an
explicit cast, in which case it becomes the type-as-written
of that cast.

rdar://problem/12565338

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
7fffce781e6ecbf4058b24df7e5ae3037569aa56 11-Oct-2012 Jordan Rose <jordan_rose@apple.com> -Warc-repeated-use-of-weak: Check messages to property accessors as well.

Previously, [foo weakProp] was not being treated the same as foo.weakProp.
Now, for every explicit message send, we check if it's a property access,
and if so, if the property is weak. Then for every assignment of a
message, we have to do the same thing again.

This is a potentially expensive increase because determining whether a
method is a property accessor requires searching through the methods it
overrides. However, without it -Warc-repeated-use-of-weak will miss cases
from people who prefer not to use dot syntax. If this turns out to be
too expensive, we can try caching the result somewhere, or even lose
precision by not checking superclass methods. The warning is off-by-default,
though.

<rdar://problem/12407765>

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
3437daad71d8694d4ddd25418751f2763c0f8979 29-Sep-2012 Jordan Rose <jordan_rose@apple.com> -Wreceiver-is-weak: rephrase warning text and add a suggestion Note.

New output:
warning: weak property may be unpredictably set to nil
note: property declared here
note: assign the value to a strong variable to keep the object alive
during use

<rdar://problem/12277204>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
376c43223ee29334685250c59fdb11e4b3c594fb 31-Aug-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C: underline name of the missing method
in the diagnbostic. // rdar://11303469



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163003 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
3b6bef9a213249c6ab6d67c07b1ac6380961be3e 24-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Push ArrayRef through the Expr hierarchy.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
5354e77e60e82828c7c2361f5c688c2667ab59cc 24-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Now that ASTMultiPtr is nothing more than a array reference, make it a MutableArrayRef.

This required changing all get() calls to data() and using the simpler constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
3fe198bf0d6118c7b080c17c3bb28d7c84e458b9 23-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Rip out remnants of move semantic emulation and smart pointers in Sema.

These were nops for quite a while and only lead to confusion. ASTMultiPtr
now behaves like a proper dumb array reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
a8eaf008e92759142982f7b40720b2b2674bd663 23-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix undefined behavior: member function calls where 'this' is a null pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
1503f0ddab0057e33efa21393fc0577580d6287a 31-Jul-2012 John McCall <rjmccall@apple.com> Introduce new queries on ObjCRuntime for how to interpret subscripts
on object pointers and whether pointer arithmetic on object pointers
is supported. Make ObjFW interpret subscripts as pseudo-objects.
Based on a patch by Jonathan Schleifer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
2f71622dc8888e6da7ce786e42e8e9fbab075de6 31-Jul-2012 Jordan Rose <jordan_rose@apple.com> Explain why ACC_bottom should never occur in diagnosing ARC casts.

This is just a clarification on Fariborz's original patch, per e-mail
discussion. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
74cb390d238b55cede882ef5f598215c3537ae95 28-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> assert on ACC_bottom when checking for invalid
CF to ARC conversions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
d9c729e67916cd8b1638ff72270dad98d1a02a58 28-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> more objc-arc: With ACC_bottom, we just provide
__bride fixit, as it doesn't matter which cast to
use. // rdar://11923822


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
24b2ab7b5939a7298b040216dcd93c838f42d8d0 28-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> objc-arc: change per Jordy's comments.
// rdar://11923822


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
533b34fa7bce6aee7a76f962f02afdf022df6d08 28-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c arc: When function calls with known CFCreate naming convention
are cast to retainable types, only suggest CFBridgingRelease/
CFBridgingRetain and not the __bridge casts.
// rdar://11923822


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
607f587a8cdf590f947a0248df8f18082eac8229 27-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> revert r160839 for now.


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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
304efd5962eaca7179f43846fff1880a5e5e873c 27-Jul-2012 Fariborz Jahanian <fjahanian@apple.com> objc-arc: When objects with known CF semantics are assigned to
retainable types in arc, only suggest CFBridgingRelease/
CFBridgingRetain and not the confusing __bridge casts.
// rdar://11923822


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
0239df868e2e09f4963bc310c56ea129f51a2288 28-Jun-2012 Jordan Rose <jordan_rose@apple.com> Warn on weak properties declared in protocols as well.

Previously this caused a crash, since protocols are not interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
33e6c2da2f72720ee6a34c6acd2a3e5ad37feca9 23-Jun-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: issue deprecation/unavailability warnings for methods called on
id <Protocol>. // rdar://11618852


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
efce31f51d6e7e31e125f96c20f6cdab3ead0a47 22-Jun-2012 James Dennett <jdennett@google.com> Documentation cleanup:
* Primarily fixed \param commands with names not matching any actual
parameters of the documented functions. In many cases this consists
just of fixing up the parameter name in the \param to match the code,
in some it means deleting obsolete documentation and occasionally it
means documenting the parameter that has replaced the older one that
was documented, which sometimes means some simple reverse-engineering
of the docs from the implementation;
* Fixed \param ParamName [out] to the correct format with [out] before
the parameter name;
* Fixed some \brief summaries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
826eac59e4b107973ed1c5a761ad8785aa1bcde4 07-Jun-2012 Jordan Rose <jordan_rose@apple.com> Attach fixits for CFBridgingRetain/Release outside any casts.

Before, the note showed the location where you could insert __bridge variants,
but the actual fixit edit came after the cast.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
d880b3aa6d594d1a7f2d307c29378c6f59b216ff 07-Jun-2012 Jordan Rose <jordan_rose@apple.com> Insert a space if necessary when suggesting CFBridgingRetain/Release.

This was a problem for people who write 'return(result);'

Also fix ARCMT's corresponding code, though there's no test case for this
because implicit casts like this are rejected by the migrator for being
ambiguous, and explicit casts have no problem.

<rdar://problem/11577346>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
31170398278ff9ef08f6b6427ee596e2ca82a790 04-Jun-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: Handle more warning cases for when
message receiver is 'weak' property.
// rdar://10225276


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
684190b8dbe5258f4708ffbd816b8c5ee5b3502d 01-Jun-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Use CFBridgingRetain/CFBridgingRelease instead of __bridge_retained/__bridge_transfer
when migrating.

rdar://11569198

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
59a9881ab252c80735d6440bd9ca0fbac252e6a8 30-May-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: revert r157407. It broke a project
and reported as PR12959. // rdar://11499742


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
b5b155cb8bd2460693572bab5ce14dabf1a27d2f 25-May-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: warn on use of property setters
backing two propeties because proprty names
match except for first letter being of different
case. // rdar://11528439, [PR12936].


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
d5f1bd247630a19d2882fe9cf5777bd0da5edb67 24-May-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: Fixes a corner case and interesting bug.
Where diagnostic about unfound property is not
issued in the context where a setter is looked up
in situation in which name and property name differ
in their first letter case. // rdar://11363363


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
c1aa40cdc8f42c3a5505ebb54aa54f3e5086b7ef 19-May-2012 Benjamin Kramer <benny.kra@googlemail.com> Apparently empty names are allowed here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
c470442fe144b93c2877134559d0067b3215289d 19-May-2012 Benjamin Kramer <benny.kra@googlemail.com> Simplify some users of DeclarationName::getNameKind. Fold getFETokenInfoAsVoid into its only caller.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
7d24e289bea2accaaed79c6ca3e5cdd0c204ddc1 16-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [libclang/AST] Index references of protocols in "@protocol(...)" syntax.

To do that, keep track of the location of the protocol id in the ObjCProtocolExpr
AST node.

rdar://11190837

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f5343ff93a9549c49469dee366733e1e31ab836e 15-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow objc @() syntax for enum types.

Previously we would reject it as illegal using a value of
enum type and on ObjC++ it was illegal to use an enumerator
as well.

rdar://11454917

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
3eda6fa901b462f0b5f72d0651f46d804aac1844 12-May-2012 Jordy Rose <jediknil@belkadan.com> Only check NSArray/NSDictionary boxing method params once.

Once we've found a "good" method, we don't need to check its argument types
again. (Even if we might have later found a "bad" method, we were already
caching the method we first looked up.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
d2d065545ba7b4349ae02afe07f799047443f1a0 12-May-2012 Jordy Rose <jediknil@belkadan.com> 80-col violations and minor reformatting. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
c8521fae12432f0dcf174988832c1db88a6b6449 12-May-2012 Jordy Rose <jediknil@belkadan.com> Clean up ObjC boxing method checks by reducing duplicated code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
99446d934c85e8b705cc6b8624e65b8eb8c22985 12-May-2012 Jordy Rose <jediknil@belkadan.com> Don't crash on boxed strings when +stringWithUTF8String: is missing.

Also, unify some diagnostics for boxed expressions that have the same form.

Fixes PR12804.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
e0fdadfd5103fa5f824920e813216615807c74ba 01-May-2012 Patrick Beard <pcbeard@mac.com> Clean up changes suggested by Douglas Gregor:

BuildObjCNumericLiteral() and BuildObjCBoxedExpr() now both using
PerformCopyInitialization() rather than PerformImplicitConversion(),
which suppresses errors.

In BuildObjCBoxedExpr(): no longer calling .getCanonicalType(),
ValueType->getAs() will remove the minimal amount of sugar.
Using ValueType->isBuiltinType() instead of isa<BuiltinType>(ValueType).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
9879556f250c7b692228e834d7fca8f1cb118bf6 20-Apr-2012 Fariborz Jahanian <fjahanian@apple.com> objective-arc: Retune my previous patch so warning
is issued on weak property as receiver and not on
any other use of a weak property. // rdar://10225276


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
289677da2d3ef2f015af8b7e41150053891589f7 19-Apr-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c arc: Issue warning under -Wreceiver-is-weak
if receiver is a 'weak' property, by type or by attribute.
// rdar://10225276


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
eb382ec1507cf2c8c12d7443d0b67c076223aec6 19-Apr-2012 Patrick Beard <pcbeard@mac.com> Implements boxed expressions for Objective-C. <rdar://problem/10194391>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
878f8502ebea491b818b48e342f9ad9de2feaff6 04-Apr-2012 Fariborz Jahanian <fjahanian@apple.com> objc-arc: provide a warning when 'receiver' of a message is 'weak'
in arc mode and opted-in with -Wreceiver-is-weak flag.
// rdar://10225276


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
ebcb57a8d298862c65043e88b2429591ab3c58d3 06-Mar-2012 Ted Kremenek <kremenek@apple.com> Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,
NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.

My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.

Docs are forthcoming to document the implementation and behavior of these features.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
f64bc202a2bcdf7b10f418ad52aaa7366c8ffef9 23-Feb-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c++: Type of an objc string literal is NSString, not 'id'.
// rdar://10907410


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
999713eea940f4e087cc3ac878689c5c5c7a7225 18-Feb-2012 Douglas Gregor <dgregor@apple.com> Rewrite variable capture within lambda expressions and blocks,
eliminating a bunch of redundant code and properly modeling how the
captures of outside blocks/lambdas affect the types seen by inner
captures.

This new scheme makes two passes over the capturing scope stack. The
first pass goes up the stack (from innermost to outermost), assessing
whether the capture looks feasible and stopping when it either hits
the scope where the variable is declared or when it finds an existing
capture. The second pass then walks down the stack (from outermost to
innermost), capturing the variable at each step and updating the
captured type and the type that an expression referring to that
captured variable would see. It also checks type-specific
restrictions, such as the inability to capture an array within a
block. Note that only the first odr-use of each
variable needs to do the full walk; subsequent uses will find the
capture immediately, so multiple walks need not occur.

The same routine that builds the captures can also compute the type of
the captures without signaling errors and without actually performing
the capture. This functionality is used to determine the type of
declaration references as well as implementing the weird decltype((x))
rule within lambda expressions.

The capture code now explicitly takes sides in the debate over C++
core issue 1249, which concerns the type of captures within nested
lambdas. We opt to use the more permissive, more useful definition
implemented by GCC rather than the one implemented by EDG.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
ae1b4af84ed0200c1040837ed62762557fbce5a7 16-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add fixits for ARC casting errors for implicit conversions as well. rdar://10289283

Also fix the fixit (oh the irony) when it uses CFBridgingRetain/CFBridgingRelease;
they are supposed to be calls with the casted expression as parameter, they should
not be inserted into the cast like the __bridge keywords.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
d6cf912e1e33167452f328d15b98a790c58c03c0 10-Feb-2012 Ted Kremenek <kremenek@apple.com> Revert r145999. This turned out to be a bad idea. Unfortunately, 'id' is used so profusely
in many APIs and large codebases that this made the deprecated warning trigger happy to
the point of not being useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f7ccbad5d9949e7ddd1cbef43d482553b811e026 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import SmallString<> into clang namespace

(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
b942cb24a060435b18fef5b43eb33d77afc0d03a 03-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Implement implicit capture for lambda expressions.

Still left: explicit captures in lambdas need to cause implicit capture, and I need to take a look at the diagnostics for some cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
4cc9b10523b61ed260767aeb62cc36fd7734a942 03-Feb-2012 Fariborz Jahanian <fjahanian@apple.com> objc: Issue diagnostic when receiver type is a forward class declaration and
it is treated as of 'id' type resulting in multiple method lookup.
// rdar://10686120


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
52b6236427e7b608eadaac2bf8f5a24dd16a1130 01-Feb-2012 Fariborz Jahanian <fjahanian@apple.com> Look for declaration of CFBridgingRetain/CFBridgingRetain before
changing the diagnostic. Also use correct spelling for both.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
93962e5360a43200faa70939571afc4fb9326cf7 01-Feb-2012 Douglas Gregor <dgregor@apple.com> Improve checking of explicit captures in a C++11 lambda expression:
- Actually building the var -> capture mapping properly (there was an off-by-one error)
- Keeping track of the source location of each capture
- Minor QoI improvements, e.g, highlighing the prior capture if
there are multiple captures, pointing at the variable declaration we
found if we reject it.

As part of this, add standard citations for the various semantic
checks we perform, and note where we're not performing those checks as
we should.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
7eb82f0d094d7180e7dee4fdea6a276c5febf81b 01-Feb-2012 Fariborz Jahanian <fjahanian@apple.com> objc-arc: In various diagnostics mention
CFBridgingRetain/CFBridgingRelease calls instead
of __bridge_retained/__bridge_transfer casts as preferred
way of moving cf objects to arc land. // rdar://10207950


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149449 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
29c3f814b64808c6dac4597b61a50ceecdf141fc 17-Jan-2012 Jean-Daniel Dupas <devlists@shadowlab.org> Fix a couples of issues in format strings checking.
PR 10274: format function attribute with the NSString archetype yields no compiler warnings
PR 10275: format function attribute isn't checked in Objective-C methods



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
746f5bcbfde5b25269169c63c66492311673b67d 12-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add IsImplicit field in ObjCMessageExpr that is true when the message
was constructed, e.g. for a property access.

This allows the selector identifier locations machinery for ObjCMessageExpr
to function correctly, in that there are not real locations to handle/report for
such a message.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
b69b42c55d56815bab62991bf839cdb41634d3af 11-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Start refactoring code for capturing variables and 'this' so that it is shared between lambda expressions and block literals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
b76a97e91dc4bea0b6b3da06c84e02f50cd351d3 07-Dec-2011 Fariborz Jahanian <fjahanian@apple.com> objc: issue deprecated/unavailable diagnostic when
methods with these attributes are sent to receivers
of 'id' type too. // rdar://10459930


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f1d1ca5b2b40e66d927c2abd16d8baa21af6911f 01-Dec-2011 Douglas Gregor <dgregor@apple.com> When sending a message to a receiver that has "unknown any" type,
force the unknown any type to "id" so that the message send can be
completed without requiring a case. Fixes <rdar://problem/10506646>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145552 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
ccc9e767f21cb9be55c98f9c7cb319134410184b 09-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't crash on invalid objc code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
7864435ef2bce200224120bd1df3aed98ea5b99a 07-Nov-2011 John McCall <rjmccall@apple.com> Rip out CK_GetObjCProperty.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
4b9c2d235fb9449e249d74f48ecfec601650de93 06-Nov-2011 John McCall <rjmccall@apple.com> Change the AST representation of operations on Objective-C
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions. It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.

Most of the effort here is in dealing with the various
clients of the AST. I've gone ahead and simplified the
ObjC rewriter's use of properties; other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily. Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.

I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
fc2eff57d7497578e8f08a5ee520ad3886a51186 29-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: desugar certain type and improve on diagnostic for
ownership qualifier cast which won't work.
// rdar://10244607


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
6d09f01af70bbd58ddbccb0a22f5479782b31797 28-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c arc: type-casting of an objc pointer to
an rvalue retainable object type with life-time qualifier has no
effect and wil be diagnosed as error. // rdar://10244607


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
3c3b7f90a863af43fa63043d396553ecf205351c 25-Oct-2011 John McCall <rjmccall@apple.com> Restore r142914 and r142915, now with missing file and apparent
GCC compiler workaround.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
327a50f46449c946c42d50d97689bcb30e2af7d9 25-Oct-2011 NAKAMURA Takumi <geek4civic@gmail.com> Revert r142914 and r142915, due to possibly missing file.

r142914: "Introduce a placeholder type for "pseudo object""
r142915: "Pull the pseudo-object stuff into its own file."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142921 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
a1b852f8e1bee5ed3604ee483803cef39ce57a20 25-Oct-2011 John McCall <rjmccall@apple.com> Introduce a placeholder type for "pseudo object"
expressions: expressions which refer to a logical rather
than a physical l-value, where the logical object is
actually accessed via custom getter/setter code.
A subsequent patch will generalize the AST for these
so that arbitrary "implementing" sub-expressions can
be provided.

Right now the only client is ObjC properties, but
this should be generalizable to similar language
features, e.g. Managed C++'s __property methods.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
88a4cfde0e0efefc40fbce3ae2c96191132218a8 17-Oct-2011 John McCall <rjmccall@apple.com> Strip qualifiers off the type of an implicit property defined by
only a setter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
5acb0c98b363400f6ade0ae7250f0102224e806b 17-Oct-2011 John McCall <rjmccall@apple.com> Teach the ARC compiler to not require __bridge casts when
passing/receiving CF objects at +0 to/from Objective-C methods
or audited C functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142219 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
43bcdb2d4d8390aec89e75f4d232b1fb218a59c5 15-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> Avoid duplicate unavailbility diagnostics in objc++.
// rdar://10268422


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
8d9ed7980405e91a12e33338a78fb99620adf553 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> ArrayRef'ize ObjCMessageExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
951376242c076c3f62dd78bf672909fc011991db 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Pass all the locations of the selector identifiers for a message expression from the parser.

They are not kept in the AST yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
2cf031d33ce6801dc11183a3cb48168f53fe06c4 01-Oct-2011 John McCall <rjmccall@apple.com> Allow the results of cf_returns_not_retained function
calls, or calls to audited functions without an explicit
return attribute, to be casted without a bridge cast.
Tie this mechanism in with the existing exceptions to
the cast restrictions. State those restrictions more
correctly and generalize.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140912 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
c737acb8e86564becc5939d681089d1851e6be1a 27-Sep-2011 Douglas Gregor <dgregor@apple.com> Revert r139989 and r140031, which implemented the Objective-C type
system change in <rdar://problem/10109725> that allows conversion from
'self' in class methods to the root of the class's hierarchy. This
conversion rule is a hack that has non-trivial repurcussions
(particularly with overload resolution).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
1d4e8e9340c9699069a33a74562e883a305f7607 17-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objc - Treat type of 'self' in class methods as root of
class of this method. // rdar://10109725


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
33e56f3273457bfa22c7c50bc46cf5a18216863d 10-Sep-2011 John McCall <rjmccall@apple.com> Rename the ARC cast kinds to start with "ARC".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
5c16d635ff67fd8f083a704b7c82607ed49a8ba2 09-Sep-2011 Douglas Gregor <dgregor@apple.com> Don't produce 'instancetype' as the type of a message send expression. Map it down to 'id'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
0bcc9bc6cd46757000245fb7b91302e6ec3478a1 09-Sep-2011 John McCall <rjmccall@apple.com> Contextually converting to 'id' is not a useful operation. Contextually
converting to an arbitrary Objective-C pointer type is. Without
significantly re-implementing anything, change the API to reflect this,
and as a minor optimization, strip the pointer conversion off before
potentially building it.

Mostly, this removes a really bizarre-looking bit of code from
BuildInstanceMessage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
819e74544a326b90d13aa73e6497b187c6545ff5 31-Aug-2011 John McCall <rjmccall@apple.com> Don't assert when diagnosing a missing cast of an unknown-anytype
message send to an unknown method.

rdar://problem/9416370, redux.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
4906cf97fb6b7aebf5b1b8b99762f0f8fe1f15ea 26-Aug-2011 John McCall <rjmccall@apple.com> Be sure to do unary conversions on the operand to an ARC
bridged cast. Noticed by AST inspection by Ted Kremenek!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
5cee1195584fa8672253139c86e922daeda69b9e 27-Jul-2011 Douglas Gregor <dgregor@apple.com> Add support for C++0x unicode string and character literals, from Craig Topper!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
4c91d89453c4a540d9ad697ceae89c8ef6049a6b 13-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> With -Wselector, don't warn about unimplemented optional method
used in @selector expression because, well, their implementation
is optional. // rdar://9545564


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
48218c60d6b53b7880917d1366ee716dec2145ca 13-Jul-2011 John McCall <rjmccall@apple.com> In debugger mode, make ObjC message sends to unknown selectors return
__unknown_anytype, and rewrite such message sends correctly.

I had to bite the bullet and actually add a debugger support mode for this
one, which is a bit unfortunate, but there really isn't anything else
I could imagine doing; this is clearly just debugger-specific behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
7a084ec568f8336ec6f10011d0118a6b19e253cb 08-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> objc++-arc: diagnose assignment/cast of a weak-unavailable
object to a __weak object/type. // rdar://9732636.
One item is yet todo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
7e5e5f4cc36fe50f46ad76dca7a266434c94f475 07-Jul-2011 John McCall <rjmccall@apple.com> In ARC, reclaim all return values of retainable type, not just those
where we have an immediate need of a retained value.

As an exception, don't do this when the call is made as the immediate
operand of a __bridge retain. This is more in the way of a workaround
than an actual guarantee, so it's acceptable to be brittle here.

rdar://problem/9504800



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
6326e05fe8c2ff92b65b4759a91e45fad5ef886f 28-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Provide fix-it for '.' <-> '->' for Objective-C ivar/property access.
// rdar://7811841


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
8295b7b51b13add75518bb9e2d9db00711a20166 22-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: Allow unbridged cast of retainable object to
integral as it is not transferring ownership..
// rdar://9619861


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
c8505ad9182c3ddcfda42bee250b2c32dd1f3219 21-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: Add support for unbridged cast of
__builtin___CFStringMakeConstantString and CF typed function calls
with explicit cf_returns_retained/cf_returns_not_retained attributes.
// rdar://9544832


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
af9751747b098d77052cb71f1e648f29cfbadcc1 21-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: CodeGen part of unbridged cast of CF types.
// rdar://9474349


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
65aa6885818d4b4eea2e5a9d12085b2398148662 21-Jun-2011 Jay Foad <jay.foad@gmail.com> Make more use of llvm::StringRef in various APIs. In particular, don't
use the deprecated forms of llvm::StringMap::GetOrCreateValue().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
1522a7c35e9872c5767721350fc8050be5b14fd2 20-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: allow explicit unbridged casts if the source of the cast is a
message sent to an objc method (or property access)
// rdar://9474349


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
71c482c76c67ad4240757c4e319ffdb72272b8ee 17-Jun-2011 John McCall <rjmccall@apple.com> Initialize a couple of variables to shut GCC up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
6c91615e5d67d59e752037beb475c4b827431172 17-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> For the purpose of @encode'ing, accept 'void' type
(even though it is incomplete type) because gcc
says so. // rdar://9622422


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
3b5904ba83fc9b968b1cd6f1ce78d01bfd6e8686 14-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Emit an error when trying to @encode an incomplete type.

There are APIs, e.g. [NSValue valueWithBytes:objCType:], which use the encoding to find out
the size of an object pointed to by a pointer. Make things safer by making it illegal to @encode
incomplete types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
89ebaed91cca7fd296ec7804e4e9fb68949c1d0e 23-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> "note" location of forward class used as receiver of
a 'deprecated' selector in the diagnostics for the
selector. // rdar://9309223



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130062 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
109ec1b05664e35e710785314c12552307f39a7d 20-Apr-2011 Douglas Gregor <dgregor@apple.com> Fix a crash-on-invalid involving non-identifier names in a member
access expression that appears to be a property reference. Fixes
<rdar://problem/8985943>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
5272adfe7066c4847b7339a75777252de64e79c2 16-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Enforce nonnull __attribute__ on Objective-C method calls.
// rdar://9287695


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
3e2193ce5feb2feb092e5ae615e85148e06e9fd2 14-Apr-2011 Anders Carlsson <andersca@mac.com> Add a flag to StringLiteral to keep track of whether the string is a pascal string or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
429bb276991ff2dbc7c5b438828b9b7737cb15eb 08-Apr-2011 John Wiegley <johnw@boostpro.com> Use ExprResult& instead of Expr *& in Sema

This patch authored by Eric Niebler.

Many methods on the Sema class (e.g. ConvertPropertyForRValue) take Expr
pointers as in/out parameters (Expr *&). This is especially true for the
routines that apply implicit conversions to nodes in-place. This design is
workable only as long as those conversions cannot fail. If they are allowed
to fail, they need a way to report their failures. The typical way of doing
this in clang is to use an ExprResult, which has an extra bit to signal a
valid/invalid state. Returning ExprResult is de riguour elsewhere in the Sema
interface. We suggest changing the Expr *& parameters in the Sema interface
to ExprResult &. This increases interface consistency and maintainability.

This interface change is important for work supporting MS-style C++
properties. For reasons explained here
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-February/013180.html>,
seemingly trivial operations like rvalue/lvalue conversions that formerly
could not fail now can. (The reason is that given the semantics of the
feature, getter/setter method lookup cannot happen until the point of use, at
which point it may be found that the method does not exist, or it may have the
wrong type, or overload resolution may fail, or it may be inaccessible.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
759abb4d9ec14ae32104a9677b60f0542b60d1d8 06-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Fix lookup for class messages sent to qualified-class
types such that protocols are seached first. Fixes
// rdar://9224670


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
14086764e340267e17803d0f8243070ffae2c76e 29-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Implements property of reference types. Adding
an executable test to llvm test suite.
// rdar://9070460.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
b460210fe0dec08971edfe33c294323cf79cb894 28-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Also 'self' in blocks need be handled specially.
// rdar://9181463


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f2d74cc083e1a83838acf99d2e1ca260d1c54742 27-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> 'self' is objective-c's 'self' objc pointer only in
an objc method. Fixes // rdar://9181463



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128389 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
27569b0f3e1b27f609a2e104b39bad077850e210 09-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Property setter/getter must be looked up in property type's
list of protocols as well. // rdar://9078584


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
61478065fbcafcf5295bb0fb796c9a92f2d861e0 09-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Lookup selector in protocol list of qualified objc type
to avoid a bogus warning. // rdar:// 9072298



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
02b0d651ecd6a4d5171dd0208c0c570c3d7103b7 08-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Warn on usage of unavailable objc 'class' in
varienty of cases. // rdar://9092208


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
2a96bf5e66731bb54dff3e4aadfbbced83377530 17-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Improve diagnostics on missing property decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
41aadbc530f071fe5ccbfc2560899a4a2e74c057 17-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Improve diagnostics when property names an object type of
a forward class. // rdar://8851803


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
8348de33e92b8278a07a7573eb7ad3c166c02b0d 08-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Support for objc use of property-dot syntax as receiver
in liu of a class method getter. objc++ uses a different
code path and is more involved (TBD).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
6b5a61b6dc400027fd793dcadceeb9da944a37ea 07-Feb-2011 John McCall <rjmccall@apple.com> A few more tweaks to the blocks AST representation:
- BlockDeclRefExprs always store VarDecls
- BDREs no longer store copy expressions
- BlockDecls now store a list of captured variables, information about
how they're captured, and a copy expression if necessary

With that in hand, change IR generation to use the captures data in
blocks instead of walking the block independently.

Additionally, optimize block layout by emitting fields in descending
alignment order, with a heuristic for filling in words when alignment
of the end of the block header is insufficient for the most aligned
field.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
26743b20e4a8c2a986e6453f0c38beba0afef633 03-Feb-2011 John McCall <rjmccall@apple.com> Capture a few implicit references to 'self'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
e00909a6e997ec33d9baa5312e9d27b52a3da770 23-Jan-2011 Ted Kremenek <kremenek@apple.com> Tweak diagnostic:

error: no super class declared in @interface for 'XXX'

to be:

error: 'X' cannot use 'super' because it is a root class

The latter explains what the user actually did wrong.

Fixes: <rdar://problem/8904409>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
e6df5f6aa1b1a0bf5d99a5395c11cb2eec152241 14-Jan-2011 Ted Kremenek <kremenek@apple.com> Remove unused store to variable 'Name'. Found by clang static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
483dd2f55ee53bc765123ead3428aa4ad2682cf3 11-Jan-2011 Douglas Gregor <dgregor@apple.com> Ensure that the result type of an Objective-C class message send is
complete. However, if it returns a reference type, don't require the
type it refers to to be complete. Fixes <rdar://problem/8807070>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
99130e5a02e93282cb393d2cba0d3dffc10abc01 22-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Complain on missing property getter method only
if property-dot expression is decidedly
an rvalue. // rdar://8155806.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
8b1aba495744bea7093899a65f08c3987263061c 16-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Improve diagnostics when property being looked up
in a forward @class object. // rdar://8774513


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f40f0d5a382395e0301d7dcbeaa2b8e90b8973b1 10-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Keep the source location of the selector in ObjCMessageExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f6a1648197562e0b133440d612d9af297d0a86cc 04-Dec-2010 John McCall <rjmccall@apple.com> Although we currently have explicit lvalue-to-rvalue conversions, they're
not actually frequently used, because ImpCastExprToType only creates a node
if the types differ. So explicitly create an ICE in the lvalue-to-rvalue
conversion code in DefaultFunctionArrayLvalueConversion() as well as several
other new places, and consistently deal with the consequences throughout the
compiler.

In addition, introduce a new cast kind for loading an ObjCProperty l-value,
and make sure we emit those nodes whenever an ObjCProperty l-value appears
that's not on the LHS of an assignment operator.

This breaks a couple of rewriter tests, which I've x-failed until future
development occurs on the rewriter.

Ted Kremenek kindly contributed the analyzer workarounds in this patch.



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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
12f78a6741a4cb3d904340f8d3d2714568b50e7a 02-Dec-2010 John McCall <rjmccall@apple.com> Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr
into the latter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
2600503170c8366af2587408c50e2beedee5d1f1 01-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> When unknown method is sent to a receiver of
'Class' type, disgnostic should refere to a
class method. Fixes // rdar://8592156


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
0943168ac126b8047f30f6bd215fbe7db14d61ba 18-Nov-2010 John McCall <rjmccall@apple.com> Add an assertion, fix a whole bunch of bugs, comment the assertion
out because there are still bugs left.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f89e55ab1bfb3ea997f8b02997c611a02254eb2d 18-Nov-2010 John McCall <rjmccall@apple.com> Calculate the value kind of an expression when it's created and
store it on the expression node. Also store an "object kind",
which distinguishes ordinary "addressed" l-values (like
variable references and pointer dereferences) and bitfield,
@property, and vector-component l-values.

Currently we're not using these for much, but I aim to switch
pretty much everything calculating l-valueness over to them.
For now they shouldn't necessarily be trusted.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
404cd1669c3ba138a9ae0a619bd689cce5aae271 13-Nov-2010 John McCall <rjmccall@apple.com> Introduce a null-to-pointer implicit cast kind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
3fa5cae9b3812cab9fab6c042c3329bb70a3d046 26-Oct-2010 John McCall <rjmccall@apple.com> No really, we don't have a retain/release system for statements/expressions
anymore.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
4c73307c74764ba99e1379677fe92af72f676531 19-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> This patch implements Next's IRGen for -fconstant-string-class=class-name.
PR6056, //rdar: //8564463



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
95f4292cc526c629fead321c7fcfd4fe0f3bc66e 15-Oct-2010 Douglas Gregor <dgregor@apple.com> When performing typo correction, look through the set of known
identifiers to determine good typo-correction candidates. Once we've
identified those candidates, we perform name lookup on each of them
and the consider the results.

This optimization makes typo correction > 2x faster on a benchmark
example using a single typo (NSstring) in a tiny file that includes
Cocoa.h from a precompiled header, since we are deserializing far less
information now during typo correction.

There is a semantic change here, which is interesting. The presence of
a similarly-named entity that is not visible can now affect typo
correction. This is both good (you won't get weird corrections if the
thing you wanted isn't in scope) and bad (you won't get good
corrections if there is a similarly-named-but-completely-unrelated
thing). Time will tell whether it was a good choice or not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
8ac2d449820fd0df00fcbde5bf82165c1f49854d 14-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Eliminate usage of ObjCSuperExpr used for
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
745da3a5bb4ea35f93f50301e7fbbb7d78d3b6bb 24-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch implements passing arrays to functions expecting
vla. Implements pr7827.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
9497a73ad0d54859edbf48beb93ebb19a7ae50c9 16-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement automatic bracket insertion for Objective-C class message
sends. These are far trickier than instance messages, because we
typically have something like

NSArray alloc]

where it appears to be a declaration of a variable named "alloc" up
until we see the ']' (or a ':'), and at that point we can't backtrace.
So, we use a combination of syntactic and semantic disambiguation to
treat this as a message send only when the type is an Objective-C type
and it has the syntax of a class message send (which would otherwise
be ill-formed).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
77328d1bb92c2c46bc3e4badc4b4b97c517903b7 16-Sep-2010 Douglas Gregor <dgregor@apple.com> Handle bracket insertion for Objective-C class messages in a very
narrow, almost useless case where we're inside a parenthesized
expression, e.g.,

(NSArray alloc])

The solution to the general case still eludes me.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
0fbda68b50ce17d7ad36ef7a5ed77518a5cd272e 15-Sep-2010 Douglas Gregor <dgregor@apple.com> Implement bracket insertion for Objective-C instance message sends as
part of parser recovery. For example, given:

a method1:arg];

we detect after parsing the expression "a" that we have the start of a
message send expression. We pretend we've seen a '[' prior to the a,
then parse the remainder as a message send. We'll then give a
diagnostic+fix-it such as:

fixit-objc-message.m:17:3: error: missing '[' at start of message
send expression
a method1:arg];
^
[

The algorithm here is very simple, and always assumes that the open
bracket goes at the beginning of the message send. It also only works
for non-super instance message sends at this time.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f312b1ea179f1c44371f9ee0cd0bc006f612de11 27-Aug-2010 John McCall <rjmccall@apple.com> One who seeks knowledge learns something new every day.
One who seeks the Tao unlearns something new every day.
Less and less remains until you arrive at non-action.
When you arrive at non-action,
nothing will be left undone.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
2de56d1d0c3a504ad1529de2677628bdfbb95cd4 25-Aug-2010 John McCall <rjmccall@apple.com> GCC didn't care for my attempt at API compatibility, so brute-force everything
to the new constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
60d7b3a319d84d688752be3870615ac0f111fb16 24-Aug-2010 John McCall <rjmccall@apple.com> OwningExprResult -> ExprResult. This patch brought to you by
M-x query-replace-regexp
\(Sema::\|Action::\|Parser::\|\)Owning\(Expr\|Stmt\)Result -> \2Result



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
9ae2f076ca5ab1feb3ba95629099ec2319833701 24-Aug-2010 John McCall <rjmccall@apple.com> Kill off ExprArg (now just Expr*) and StmtArg (now just Stmt*).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
2f4eaef37476ae6891ede8ba215d0f6fd093629b 17-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Convert all uses of StringLiteral::getStrData() to StringLiteral::getString()
and remove getStrData(). Patch by Peter Davies (with some tweaks).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
ba551983016ee3eac5421255d2ebe6723e61befb 10-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a spurious warning when message sent to qualified-id
type receiver (pr7861).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
f60946222721d9ba3c059563935c17b84703187a 23-Jul-2010 Douglas Gregor <dgregor@apple.com> Vectors are not integer types, so the type system should not classify
them as such. Type::is(Signed|Unsigned|)IntegerType() now return false
for vector types, and new functions
has(Signed|Unsigned|)IntegerRepresentation() cover integer types and
vector-of-integer types. This fixes a bunch of latent bugs.

Patch from Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109229 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
5291c3cec0dbe8ad1d8e7e67e93af2b1586d5400 13-Jul-2010 Douglas Gregor <dgregor@apple.com> When forming a function call or message send expression, be sure to
strip cv-qualifiers from the expression's type when the language calls
for it: in C, that's all the time, while C++ only does it for
non-class types.

Centralized the computation of the call expression type in
QualType::getCallResultType() and some helper functions in other nodes
(FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant
callers of getResultType() to getCallResultType().

Fixes PR7598 and PR7463, along with a bunch of getResultType() call
sites that weren't stripping references off the result type (nothing
stripped cv-qualifiers properly before this change).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
da59e09f1fd53350fcd949adbadd8148117f21b2 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> C return types must be complete as well.
Moved check before we build the ObjCMessageExpr node.
(PR7386 related).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
d4266629ed62e3a0de5e2cb2dfb8e806f9bdc5f6 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Make sure result type of objc++ message expression is
complete before attempting to bind it to a temporary.
Fixes PR7386.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
2d6b0e94db30c0e2754d270753c6f75478e451bf 22-May-2010 Douglas Gregor <dgregor@apple.com> Improve our handling of reference binding for subobjects of
temporaries. There are actually several interrelated fixes here:

- When converting an object to a base class, it's only an lvalue
cast when the original object was an lvalue and we aren't casting
pointer-to-derived to pointer-to-base. Previously, we were
misclassifying derived-to-base casts of class rvalues as lvalues,
causing various oddities (including problems with reference binding
not extending the lifetimes of some temporaries).

- Teach the code for emitting a reference binding how to look
through no-op casts and parentheses directly, since
Expr::IgnoreParenNoOpCasts is just plain wrong for this. Also, make
sure that we properly look through multiple levels of indirection
from the temporary object, but destroy the actual temporary object;
this fixes the reference-binding issue mentioned above.

- Teach Objective-C message sends to bind the result as a temporary
when needed. This is actually John's change, but it triggered the
reference-binding problem above, so it's included here. Now John
can actually test his return-slot improvements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
bd054dba8a3023821f2a0951b0fae05e3522a7c9 20-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Renamed misleading getSourceRange -> getLocalSourceRange and getFullSourceRange -> getSourceRange for TypeLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
403783337fc06ce46bc2adeb7f09e0c0471f758e 16-May-2010 Chris Lattner <sabre@nondot.org> fix rdar://7985267 - Don't emit an error about a non-pod argument
passed to va_start, it doesn't actually pass it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
3ba606199be8056ae83596260bd6fd5872942905 13-May-2010 Fariborz Jahanian <fjahanian@apple.com> Objective-C++ Sema. Fix a bug in instantiation of receivers.
Completes radar 7963410.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
79d3f04688497857d29fe1f009bbc7b4b830a21b 13-May-2010 Fariborz Jahanian <fjahanian@apple.com> Objective-C++ Sema. Support for conversion of a C++
class object used as a receiver to an objective-c
pointer via a converwsion function. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
8a4377697161c5087e27cc40d6e0682f0cd1fa20 24-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> With -fno-constant-cfstrrings, class NSConstantString
must be there or it is error (Next runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f49bb082ebf6413b2d3cb956e9c78dbb8a978c58 22-Apr-2010 Douglas Gregor <dgregor@apple.com> When a dependent Objective-C++ message send was able to resolve the
method being called at template definition time, retain that method
and pass it through to type-checking. We will not perform any lookup
for the method during template instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
39968adc66ab02275d2f561e372a20ae454bd4e7 22-Apr-2010 Douglas Gregor <dgregor@apple.com> Remove the SelectorLoc argument to Sema::BuildInstanceMesssage and
Sema::BuildClassMessage; we weren't using it, and template
instantiation was faking it anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
92e986e0adb79e8a47f738bd608e6c97c547641d 22-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement template instantiation for Objective-C++ message sends. We
support dependent receivers for class and instance messages, along
with dependent message arguments (of course), and check as much as we
can at template definition time.

This commit also deals with a subtle aspect of template instantiation
in Objective-C++, where the type 'T *' can morph from a dependent
PointerType into a non-dependent ObjCObjectPointer type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
688fc9b9b4323a294f5bf4f8a83f7c365edec573 22-Apr-2010 Douglas Gregor <dgregor@apple.com> Switch the initialization of Objective-C message parameters (as occurs
during message sends) over to the new initialization code and away
from the C-only CheckSingleAssignmentConstraints. The enables the use
of C++ types in method parameters and message arguments, as well as
unifying more initialiation code overall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
1569f95831a8c99e9f664137bf8f40e47ee3d90f 21-Apr-2010 Douglas Gregor <dgregor@apple.com> Migrate the responsibility for turning the receiver name in an
Objective-C class message expression into a type from the parser
(which was doing so in two places) to Action::getObjCMessageKind()
which, in the case of Sema, reduces the number of name lookups we need
to perform.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f95861a4ab6bbd6a975ed079dd70eb1cc22f4467 21-Apr-2010 Douglas Gregor <dgregor@apple.com> Eliminate unused code in Sema::ActOnSuperMessage and use early exits
to reduce nesting. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
2725ca8eb3354975ca77ed4b88ede7b60b216b9a 21-Apr-2010 Douglas Gregor <dgregor@apple.com> Rework the Parser-Sema interaction for Objective-C message
sends. Major changes include:

- Expanded the interface from two actions (ActOnInstanceMessage,
ActOnClassMessage), where ActOnClassMessage also handled sends to
"super" by checking whether the identifier was "super", to three
actions (ActOnInstanceMessage, ActOnClassMessage,
ActOnSuperMessage). Code completion has the same changes.
- The parser now resolves the type to which we are sending a class
message, so ActOnClassMessage now accepts a TypeTy* (rather than
an IdentifierInfo *). This opens the door to more interesting
types (for Objective-C++ support).
- Split ActOnInstanceMessage and ActOnClassMessage into parser
action functions (with their original names) and semantic
functions (BuildInstanceMessage and BuildClassMessage,
respectively). At present, this split is onyl used by
ActOnSuperMessage, which decides which kind of super message it
has and forwards to the appropriate Build*Message. In the future,
Build*Message will be used by template instantiation.
- Use getObjCMessageKind() within the disambiguation of Objective-C
message sends vs. array designators.

Two notes about substandard bits in this patch:
- There is some redundancy in the code in ParseObjCMessageExpr and
ParseInitializerWithPotentialDesignator; this will be addressed
shortly by centralizing the mapping from identifiers to type names
for the message receiver.
- There is some #if 0'd code that won't likely ever be used---it
handles the use of 'super' in methods whose class does not have a
superclass---but could be used to model GCC's behavior more
closely. This code will die in my next check-in, but I want it in
Subversion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
04badcf84c8d504d8491c7c7e29b58f52cb16640 21-Apr-2010 Douglas Gregor <dgregor@apple.com> Overhaul the AST representation of Objective-C message send
expressions, to improve source-location information, clarify the
actual receiver of the message, and pave the way for proper C++
support. The ObjCMessageExpr node represents four different kinds of
message sends in a single AST node:

1) Send to a object instance described by an expression (e.g., [x method:5])
2) Send to a class described by the class name (e.g., [NSString method:5])
3) Send to a superclass class (e.g, [super method:5] in class method)
4) Send to a superclass instance (e.g., [super method:5] in instance method)

Previously these four cases where tangled together. Now, they have
more distinct representations. Specific changes:

1) Unchanged; the object instance is represented by an Expr*.

2) Previously stored the ObjCInterfaceDecl* referring to the class
receiving the message. Now stores a TypeSourceInfo* so that we know
how the class was spelled. This both maintains typedef information
and opens the door for more complicated C++ types (e.g., dependent
types). There was an alternative, unused representation of these
sends by naming the class via an IdentifierInfo *. In practice, we
either had an ObjCInterfaceDecl *, from which we would get the
IdentifierInfo *, or we fell into the case below...

3) Previously represented by a class message whose IdentifierInfo *
referred to "super". Sema and CodeGen would use isStr("super") to
determine if they had a send to super. Now represented as a
"class super" send, where we have both the location of the "super"
keyword and the ObjCInterfaceDecl* of the superclass we're
targetting (statically).

4) Previously represented by an instance message whose receiver is a
an ObjCSuperExpr, which Sema and CodeGen would check for via
isa<ObjCSuperExpr>(). Now represented as an "instance super" send,
where we have both the location of the "super" keyword and the
ObjCInterfaceDecl* of the superclass we're targetting
(statically). Note that ObjCSuperExpr only has one remaining use in
the AST, which is for "super.prop" references.

The new representation of ObjCMessageExpr is 2 pointers smaller than
the old one, since it combines more storage. It also eliminates a leak
when we loaded message-send expressions from a precompiled header. The
representation also feels much cleaner to me; comments welcome!

This patch attempts to maintain the same semantics we previously had
with Objective-C message sends. In several places, there are massive
changes that boil down to simply replacing a nested-if structure such
as:

if (message has a receiver expression) {
// instance message
if (isa<ObjCSuperExpr>(...)) {
// send to super
} else {
// send to an object
}
} else {
// class message
if (name->isStr("super")) {
// class send to super
} else {
// send to class
}
}

with a switch

switch (E->getReceiverKind()) {
case ObjCMessageExpr::SuperInstance: ...
case ObjCMessageExpr::Instance: ...
case ObjCMessageExpr::SuperClass: ...
case ObjCMessageExpr::Class:...
}

There are quite a few places (particularly in the checkers) where
send-to-super is effectively ignored. I've placed FIXMEs in most of
them, and attempted to address send-to-super in a reasonable way. This
could use some review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
b00ab27f64abd18a68fc41699b86d0bc36189e21 20-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to support transparent_union types on
objective-c methods. Fixes radar 7875968.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
81d3466d037dc5844234c7a93dab21a6ad986e7d 20-Apr-2010 Douglas Gregor <dgregor@apple.com> Keep proper source location information for the type in an Objective-C
@encode expression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
ed46442adea496dfb01dbbe53ace583d5614e79a 19-Apr-2010 Douglas Gregor <dgregor@apple.com> When normal name lookup to disambiguiate an Objective-C message send
fails to find anything, perform ivar lookup and, if we find one,
consider this an instance message.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
ccfa9639f8d09733bcf1c2572c5bd3daba5bd632 16-Apr-2010 Eric Christopher <echristo@apple.com> Expand the argument diagnostics for too many arguments and give
both number seen and number expected.

Finishes fixing PR6501.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101442 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
d77b9a29651d748f0e30a8dad8969635fc04f725 16-Apr-2010 Eric Christopher <echristo@apple.com> Expand argument diagnostic for too few arguments to give the number
of arguments both seen and expected.

Fixes PR6501.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
6be3cb835ad85bfae46dc591503f15a0502472ab 14-Apr-2010 Chris Lattner <sabre@nondot.org> remove some obsolete super-handling code that I forgot to zap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
47bd54392a4fd0f10e04de6a0420fd4838caaa0e 14-Apr-2010 Douglas Gregor <dgregor@apple.com> Implement typo correction for Objective-C message sends when the
receiver is a mis-typed class name. Previously, we would give a non-specific
typo-correction diagnostic from the expression-parsing code, but there
was no fix-it because it was too late to recover. Now, we give a nice
diagnostic

honk.m:6:4: error: unknown receiver 'Hnk'; did you mean 'Honk'?
[Hnk method];
^~~
Honk
honk.m:1:1: note: 'Honk' declared here
@interface Honk
^

which includes a fix-it.

We still need to recover better from mis-typing "super".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
a7a98c97e650545e69f4d868c95f0e3370971b0f 12-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6819


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
15faee19fdb9017dd6d08a690427b18c3b062c2d 12-Apr-2010 Chris Lattner <sabre@nondot.org> Have the parser decide whether a message to super is a variable or
type, instead of having sema do it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
eb483eb3ee80300f15d6d13573d82493c2194461 11-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6811 by not parsing 'super' as a magic expression in
LookupInObjCMethod. Doing so allows all sorts of invalid code
to slip through to codegen. This patch does not change the
AST representation of super, though that would now be a natural
thing to do since it can only be in the receiver position and
in the base of a ObjCPropertyRefExpr.

There are still several ugly areas handling super in the parser,
but this is definitely a step in the right direction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
b9d4fc1f54924a7b242fb763192a40c19fa6103d 11-Apr-2010 Chris Lattner <sabre@nondot.org> actually the interface grossness in the previous patch was due to
typo correction. However, now that the code has been factored out
of LookupMemberExpr, it can recurse to itself instead of to
LookupMemberExpr! Remove grossness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
7f81652f97a69ae8b514893a69c0245253687e55 11-Apr-2010 Chris Lattner <sabre@nondot.org> factor the code that handles "expr.field" when expr is a
pointer to an objc interface out to a method in SemaExprObjC.
This is *much* uglier than it should be due to grossness in
LookupMemberExpr :(


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
0784fcddb4a399e57248704fc202f3f5c1254018 11-Apr-2010 Chris Lattner <sabre@nondot.org> fix a problem causing us to lose the ''s around objc interface names
in a diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
8149a5786def747af783a9e3c22714bb7ab42b9c 22-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Diagnose miuse of property dot-syntax instead of crashing.
(radar 7634653).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
4b7a834e0fecddd9eaf1f4567867c718e4eebf50 15-Mar-2010 John McCall <rjmccall@apple.com> Add support for -Wwrite-strings. Patch by Mike M! Fixes PR 4804.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
c2350e553b853ad00914faf23fa731e5fc4a8a5c 08-Mar-2010 Douglas Gregor <dgregor@apple.com> Extend ObjCMessageExpr for class method sends with the source location
of the class name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
c5e77d5a97b495c41cb65c25b6f0ba2b62a14345 19-Feb-2010 Douglas Gregor <dgregor@apple.com> Make Sema::ActOnClassMessage robust when name lookup for the receiver
name finds something other than a TypedefDecl or an
ObjCInterfaceDecl. This is a small part of <rdar://problem/7660386>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
eb3b324800598cc3d5385fbad95ae5cff2c79113 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Allocate the SubExprs array in ObjCMessageExpr using the allocator associated with ASTContext. This fixes yet another leak (<rdar://problem/7639260>).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
6d5a1c28593443f3973ef38f8fa042d59182412d 03-Feb-2010 Daniel Dunbar <daniel@zuster.org> Revert "Numerous changes to selector handling:", this breaks a whole bunch of
working code, for no apparent reason.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
a8fa96e366ab36145a5500dd4fbea717c217f131 03-Feb-2010 David Chisnall <csdavec@swan.ac.uk> Numerous changes to selector handling:

- Don't use GlobalAliases with non-0 GEPs (GNU runtime) - this was unsupported and LLVM will be generating errors if you do it soon. This also simplifies the code generated by the GNU runtime a bit.

- Make GetSelector() return a constant (GNU runtime), not a load of a store of a constant.

- Recognise @selector() expressions as valid static initialisers (as GCC does).

- Add methods to GCObjCRuntime to emit selectors as constants (needed for using @selector() expressions as constants. These need implementing for the Mac runtimes - I couldn't figure out how to do this, they seem to require a load.

- Store an ObjCMethodDecl in an ObjCSelectorExpr so that we can get at the type information for the selector. This is needed for generating typed selectors from @selector() expressions (as GCC does). Ideally, this information should be stored in the Selector, but that would be an invasive change. We should eventually add checks for common uses of @selector() expressions. Possibly adding an attribute that can be applied to method args providing the types of a selector so, for example, you'd do something like this:

- (id)performSelector: __attribute__((selector_types(id, SEL, id)))(SEL)
withObject: (id)object;

Then, any @selector() expressions passed to the method will be check to ensure that it conforms to this signature. We do this at run time on the GNU runtime already, but it would be nice to do it at compile time on all runtimes.

- Made @selector() expressions emit type info if available and the runtime supports it.

Someone more familiar with the Mac runtime needs to implement the GetConstantSelector() function in CGObjCMac. This currently just assert()s.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
a873dfc9e7314681bb37efd9ab185045de121e43 03-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement the lvalue-to-rvalue conversion where needed. The
lvalue-to-rvalue conversion adjusts lvalues of qualified, non-class
type to rvalue expressions of the unqualified variant of that
type. For example, given:

const int i;
(void)(i + 17);

the lvalue-to-rvalue conversion for the subexpression "i" will turn it
from an lvalue expression (a DeclRefExpr) with type 'const int' into
an rvalue expression with type 'int'. Both C and C++ mandate this
conversion, and somehow we've slid through without implementing it.

We now have both DefaultFunctionArrayConversion and
DefaultFunctionArrayLvalueConversion, and which gets used depends on
whether we do the lvalue-to-rvalue conversion or not. Generally, we do
the lvalue-to-rvalue conversion, but there are a few notable
exceptions:
- the left-hand side of a '.' operator
- the left-hand side of an assignment
- a C++ throw expression
- a subscript expression that's subscripting a vector

Making this change exposed two issues with blocks:
- we were deducing const-qualified return types of non-class type
from a block return, which doesn't fit well
- we weren't always setting the known return type of a block when it
was provided with the ^return-type syntax

Fixes the current Clang-on-Clang compile failure and PR6076.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
e4fb82839a762e632f63e195058015e2f1ca27a8 23-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> outside a method, 'super' should resolve in a normal name look up
to mimic gcc's behavior. Fixes radar 7400691.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
6864748fc9a780e6db0bb5a7bd20aa889882dc94 16-Dec-2009 Douglas Gregor <dgregor@apple.com> Fix semantic diagnostics that embed English works, from Nicola Gigante!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
73c39abdbb79927605d740c93dd9629e3e4f9bfe 20-Oct-2009 Eli Friedman <eli.friedman@gmail.com> Remove default argument for ImpCastExprToType. Add appropriate argument
to all callers. Switch a few other users of CK_Unknown to proper cast
kinds.

Note that there are still some situations where we end up with
CK_Unknown; they're pretty easy to find with grep. There
are still a few missing conversion kinds, specifically
pointer/int/float->bool and the various combinations of real/complex
float/int->real/complex float/int.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
09105f52b1f28cbb1374c27c3c70f5517e2c465d 20-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr".
A field rename and more comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
154440e6a8fa6ac5bca395876d79b530b39a2c1c 18-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
470301bac9c8abfc6b451b3b669c6695a9fd1518 22-Jul-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6770276> Support Class<Proto> syntax.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
67ef8eaea8a0a2073147a8d863f0e3f30d525802 20-Jul-2009 Steve Naroff <snaroff@apple.com> 5 cleanups to ObjCObjectPointerType work:

- Remove Sema::CheckPointeeTypesForAssignment(), a temporary API I added to ease migration to ObjCObjectPointerType. Convert Sema::CheckAssignmentConstraints() to no longer depend on the temporary API.
- Sema::ConvertDeclSpecToType(): Replace a couple FIXME's with an important comment/example.
- Sema::GetTypeForDeclarator(): Get the protocol's from the interface, NOT the declspec (to support the following C typedef idiom: "typedef C<P> T; T *obj").
- Sema::ObjCQualifiedIdTypesAreCompatible(): Removed some dead code.
- ASTContext::getObjCEncodingForTypeImpl(): Some minor cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
c15cb2af27514ecc879daba9aa01389c5203685d 18-Jul-2009 Steve Naroff <snaroff@apple.com> Remove ObjCQualifiedInterfaceType:-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
35366a67baa970c287c714c957cf78a4131cf60d 17-Jul-2009 Ted Kremenek <kremenek@apple.com> Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
1a1a6e2bd4c5aefd7fd643cf25915f9623a02e59 16-Jul-2009 Ted Kremenek <kremenek@apple.com> Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.
This method is intended to eventually replace the individual
Type::getAsXXXType<> methods.

The motivation behind this change is twofold:

1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of
them are basically copy-and-paste.

2) By centralizing the implementation of the getAs<Type> logic we can more
smoothly move over to Doug Gregor's proposed canonical type smart pointer
scheme.

Along with this patch:

a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>.
b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
430ee5a4fd20c02e59d6a0d720401a5f21e4e5c1 13-Jul-2009 Steve Naroff <snaroff@apple.com> Fix 5 issues from Chris's feedback on http://llvm.org/viewvc/llvm-project?view=rev&revision=75314.

Still more to come...just wanted to get the no-brainers out of the way.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
d1b3c2dd5bc1f3103bee6137957aa7c5f8f2f0bc 18-Jun-2009 Steve Naroff <snaroff@apple.com> First step toward fixing <rdar://problem/6613046> refactor clang objc type representation.

Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType).

This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types).

No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
7ff22ded2221f442b1f8ff78172938d04ec8c926 16-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Implements -Wundeclared-selector for ObjC.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
fc0f021b492cf28ee7b3a6bd4445ae569e6f15de 07-Jun-2009 Anders Carlsson <andersca@mac.com> Template instantiation support for Obj-C @encode expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
446ee4eb4fc4c705a59365252df7a5c253daafa1 27-May-2009 Steve Naroff <snaroff@apple.com> Convert ObjC qualified type clients over to using iterators.

This allows me to remove some API that I don't want to carry over to ObjCObjectPointerType.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
187ba159b04d8cc760daeee5cfbbc69450b2d50d 26-May-2009 Anders Carlsson <andersca@mac.com> An Obj-C message send expression can never have a reference type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
636bed1b8185099ef40a4f7fd192fc4242b385a4 21-May-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a warning bug when receiver is an object via
setting of NSObject attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
5b53005fb9ef24b8bdfe995f29b4662de468128a 13-May-2009 Fariborz Jahanian <fjahanian@apple.com> Some early declarations to support sentinel attribute on
message dispatches (and function calls later). No change in
functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
9f8f026fc1cd1aa2942a2850a037398415128f8a 09-May-2009 Fariborz Jahanian <fjahanian@apple.com> We want to diagnose sending message to a forward class
and we also want to tell which message is actually
being sent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
89bc314c6ddf3b851ccf68bc34d3f1b5927a10f6 09-May-2009 Fariborz Jahanian <fjahanian@apple.com> Warn if forward class is used as a receiver.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
041f2fd6237c7ce72864e42c66c6b12b52f35f9c 05-May-2009 Fariborz Jahanian <fjahanian@apple.com> Issue a warning in odd case of instance method used
in a 'Class' receiver which is not a root instance
method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
d0d4599d8ff308ac34db9e38c578f5b8d32afa7e 29-Apr-2009 Chris Lattner <sabre@nondot.org> fix PR4021, array and functions decay in the receiver position of an objc message send.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
2c4463f744487e242f7c88b6daa0abf5cb24219e 12-Apr-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6770142 - Class and qualified id's are compatible, just like
Class and unqualified id's are.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
312531a8cd69c562d5687bd69fd334be99d87320 12-Apr-2009 Chris Lattner <sabre@nondot.org> implement rdar://6780761, making sema reject some code that otherwise
crashes codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
ebaa768521cfd5318d77f1efaf7ae47020863a9d 07-Apr-2009 Steve Naroff <snaroff@apple.com> Tweak Sema::ActOnInstanceMessage() to look for a class method when dealing with qualified id's. This change is motivated by our desire to not support the "Class<foo>" idiom. Note that the change makes perfect sense (since all ObjC classes are also id/instances).

This allow us to document a simple migration path...change "Class <foo>" to "id <foo>".

This effects:
- <rdar://problem/6761939> TASK: File source change radars for "qualified Class" errors
- <rdar://problem/6761864> Protocol qualified Class is unsupported


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
d9fd7647e286723d100db4cfeab31ec022eec629 07-Apr-2009 Steve Naroff <snaroff@apple.com> Change the type of ObjC @ string constants (from NSConstantString->NSString).

This fixes <rdar://problem/6757102> clang type for @"xxx" is "NSConstantString *" (GCC type is "NSString *").


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
64540d71b4aaab07d93cb3593ce462d26a83d326 29-Mar-2009 Chris Lattner <sabre@nondot.org> various cleanups


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
fdc92b7877535e6264fe43cfbdc8f01e9b224f81 10-Mar-2009 Steve Naroff <snaroff@apple.com> Simplify SelectorTable::constructSetterName() usage...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
0c73f37f0a48a1512bc0477a71f0d6cffcb78fc0 09-Mar-2009 Chris Lattner <sabre@nondot.org> Fix PR3766, a really nasty silent miscompilation case where we emitted
a warning and then threw away the AST. While I'm in there, tighten up the
code to actually reject completely bogus cases (sending a message to a
struct). We still allow sending a message to an int, which doesn't make
sense but GCC allows it and is easy to support.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
61f72cbd037e58f12cfe90cd442373f44092f030 09-Mar-2009 Steve Naroff <snaroff@apple.com> Implement property '.' notation on Factory/Class objects. Parser changes aren't very pretty:-(

This fixes <rdar://problem/6496506> Implement class setter/getter for properties.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
64949d3a2ef5e4e38d4ec4dc9e980085c09ae01a 08-Mar-2009 Steve Naroff <snaroff@apple.com> Remove dead clause (we decided not to support protocol qualified 'Class').


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
5609ec04ed9a4fd58c3203d210cf32e9283feb5e 08-Mar-2009 Steve Naroff <snaroff@apple.com> Improvements to private method lookup.

Patch by Jean-Daniel Dupas. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
e61b988febb3409c294d2ec6b6f931f6f08f67b3 05-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Removed an unfortunate cut and paste left-over.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
175ba1e8180083927aabd7cc8137baa16be75646 04-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Some refactoring of recent code. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66041 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
b1006c7f5647025541b1b1cc64a196a417e6c6ac 04-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a corner case of message lookup looking for class methods.
If all else failed, find the message in class's root's
list of instacne methods!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
6b9dfd4257b85c388a9e3cd345cf28acb7351006 04-Mar-2009 Steve Naroff <snaroff@apple.com> Finish up some fixes related to <rdar://problem/6497631> Message lookup is sometimes different than gcc's.

- Disallow casting 'super'. GCC allows this, however it doesn't make sense (super isn't an expression and the cast won't alter lookup/dispatch).
- Tighten up lookup when messaging 'self'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
268bc8c1f3a27d2fbd73c3115e4d633d31422ca5 03-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Implement an important missing warning when a selector
is searched for in the global pool. It already uncovered
a clang bug in message selection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
8e2945ad9104f0ce4928c386faf458b6b83d9060 01-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6248764> parser rejects: bad receiver type 'CFStringRef'.

Downgrade an error to a warning (for GCC compatibility).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
1f484f4aef0ea52b920e568e0c1fa2cbdfe98957 26-Feb-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6614945> method not found.

This was a fairly recent regression.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f1afaf6fe2d94ab265299853f288b676694f7554 26-Feb-2009 Steve Naroff <snaroff@apple.com> Fix http://llvm.org/bugs/show_bug.cgi?id=3544.

The code for looking up local/private method in Sema::ActOnInstanceMessage() was not handling categories properly. Sema::ActOnClassMessage() didn't have this bug.
Created a helper with the correct logic and changed both methods to use it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
eaf2bb89eb2aad3b80673de30febe52df43c10ec 24-Feb-2009 Chris Lattner <sabre@nondot.org> first wave of fixes for @encode sema support. This is part of PR3648.

The big difference here is that (like string literal) @encode has
array type, not pointer type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
279d896d4972417f62537fe4a87a8c3c3d675108 23-Feb-2009 Steve Naroff <snaroff@apple.com> Remove isSuperExpr(), which ignores any casts on 'super'.
I don't think casting super makes any sense (since it won't effect method lookup).
Will discuss with other offline and decide what to do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
d526c2f2ef28643c15589135b59eb4a8d9f9414c 23-Feb-2009 Steve Naroff <snaroff@apple.com> Sema::ActOnInstanceMessage(): Tighen up the lookup rules for handling messages to 'Class'. Also improve "super" handling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
ac1337d33197d770157b38812ed5c1ae7cc620c5 22-Feb-2009 Steve Naroff <snaroff@apple.com> Minor cleanup, replace bool with qual_empty().


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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
8b1527b7b9a3c5687e336f08f1e18263af0e107d 22-Feb-2009 Steve Naroff <snaroff@apple.com> Remove debugging statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f7f52e7bf5a4dc36d45b98531e0b21e343fc19de 21-Feb-2009 Steve Naroff <snaroff@apple.com> More work to integrate newly added ObjCQualifiedClassType into the type system.

This is necessary 'plumbing' to fix <rdar://problem/6497631> Message lookup is sometimes different than gcc's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
39c28bbbf235533e9ae7d06fb9b13371dfcc542d 18-Feb-2009 Chris Lattner <sabre@nondot.org> fix the ownership issues and location tracking in
Sema::ParseObjCStringLiteral.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
2085fd6cd22ec5c268175251db10d7c60caf7aaa 18-Feb-2009 Chris Lattner <sabre@nondot.org> privatize all of the string literal memory allocation/creation
stuff behind a private static function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f4b136fb40aeedeaaa6ce7cdff22f375eb76c47b 18-Feb-2009 Chris Lattner <sabre@nondot.org> add some comments describing what is happening here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
a0af1fe67da29343cd182c51cd48d91b740ecef2 18-Feb-2009 Chris Lattner <sabre@nondot.org> simplify the code used to compute the type of an objc string. This makes
it faster in the common case when NSConstantString is around.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
690398188ea5b428f06aa13c7d4ce6eb741ad4f9 18-Feb-2009 Chris Lattner <sabre@nondot.org> rename CheckBuiltinCFStringArgument -> CheckObjCString


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
726e168dc09fb23f53c7b004f8e919421ee91806 18-Feb-2009 Chris Lattner <sabre@nondot.org> change the StringLiteral AST node to track all of the SourceLocations of
the various PPTokens that are pasted together to make it. In the course
of working on this, I discovered ParseObjCStringLiteral which needs some
work. I'll tackle it next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
76a642ff4fce7a0648c79a1f01324a8c3880e251 15-Feb-2009 Chris Lattner <sabre@nondot.org> Refactor the deprecated and unavailable checks into a new
DiagnoseUseOfDeprecatedDecl method. This ensures that they
are treated consistently. This gets us 'unavailable' support
on a few new types of decls, and makes sure we consistently
silence deprecated when the caller is also deprecated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
1251bb85d2fa607079f65f2d5bbc9dcf074a93a2 15-Feb-2009 Chris Lattner <sabre@nondot.org> implement support for attribute(unavailable) on objc methods.
This implements gcc/testsuite/objc.dg/method-attribute-1.m


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
59843ad8835d497cd3c17ff91aa039e31d607791 14-Feb-2009 Anders Carlsson <andersca@mac.com> Add support for deprecated Obj-C methods. The semantics mostly match what gcc has.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
ff975cfab9ada27df86038286d1678084aeb3428 14-Feb-2009 Anders Carlsson <andersca@mac.com> Pass the location of the start of the selector to ActOnClassMessage/ActOnInstanceMessage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
389bf46ae41241a656ed71b00ac2177d7f385651 12-Feb-2009 Steve Naroff <snaroff@apple.com> Several cleanups:
- rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect.
- add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time.
- move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
8189cde56b4f6f938cd65f53c932fe1860d0204c 07-Feb-2009 Ted Kremenek <kremenek@apple.com> Overhaul of Stmt allocation:
- Made allocation of Stmt objects using vanilla new/delete a *compiler
error* by making this new/delete "protected" within class Stmt.
- Now the only way to allocate Stmt objects is by using the new
operator that takes ASTContext& as an argument. This ensures that
all Stmt nodes are allocated from the same (pool) allocator.
- Naturally, these two changes required that *all* creation sites for
AST nodes use new (ASTContext&). This is a large patch, but the
majority of the changes are just this mechanical adjustment.
- The above changes also mean that AST nodes can no longer be
deallocated using 'delete'. Instead, one most do
StmtObject->Destroy(ASTContext&) or do
ASTContextObject.Deallocate(StmtObject) (the latter not running the
'Destroy' method).

Along the way I also...
- Made CompoundStmt allocate its array of Stmt* using the allocator in
ASTContext (previously it used std::vector). There are a whole
bunch of other Stmt classes that need to be similarly changed to
ensure that all memory allocated for ASTs comes from the allocator
in ASTContext.
- Added a new smart pointer ExprOwningPtr to Sema.h. This replaces
the uses of llvm::OwningPtr within Sema, as llvm::OwningPtr used
'delete' to free memory instead of a Stmt's 'Destroy' method.

Big thanks to Doug Gregor for helping with the acrobatics of making
'new/delete' private and the new smart pointer ExprOwningPtr!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
6e94ef5696cfb005d3fc7bbac8dcf7690b64f0a5 06-Feb-2009 Ted Kremenek <kremenek@apple.com> Move StringLiteral to allocate its internal string data using the allocator in
ASTContext. This required changing all clients to pass in the ASTContext& to the
constructor of StringLiteral. I also changed all allocations of StringLiteral to
use new(ASTContext&).

Along the way, I updated a bunch of new()'s in StmtSerialization.cpp to use the
allocator from ASTContext& (not complete).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
133147d2d31bdcd6943635f80e77d78d2504148f 28-Jan-2009 Steve Naroff <snaroff@apple.com> Remove 'NamespaceNameOnly' argument to Sema::LookupDecl(). It is unused.

Even though Sema::LookupDecl() is deprecated, it's still used all over the place. Simplifying the interface will make it easier to understand/optimize/convert.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
5ac8aff3d7431dc7e4d64d960574a10c9f7e0078 26-Jan-2009 Douglas Gregor <dgregor@apple.com> Some micro-optimizations for DISABLE_SMART_POINTERS:
- When it's safe, ActionResult uses the low bit of the pointer for
the "invalid" flag rather than a separate "bool" value. This keeps
GCC from generating some truly awful code, for a > 3x speedup in the
result-passing microbenchmark.
- When DISABLE_SMART_POINTERS is defined, store an ActionResult
within ASTOwningResult rather than an ASTOwningPtr. Brings the
performance benefits of the above to smart pointers with
DISABLE_SMART_POINTERS defined.

Sadly, these micro-benchmark performance improvements don't seem to
make much of a difference on Cocoa.h right now. However, they're
harmless and might help with future optimizations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
ebff1fed660fac9c50a7b7571da797bb489254a4 16-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Don't ICE (issue diagnostics) when receiver is a non-objc
type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
dce5e2cabf07ff25eb4d9e1859c0a21c69f588d2 16-Jan-2009 Anders Carlsson <andersca@mac.com> Use a single function for doing vararg argument promotion. Also, make sure to do the promotion before checking the type - fixes PR3340.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
906fed0fb54a338961aba3aa54802b7d68de94c7 13-Jan-2009 Anders Carlsson <andersca@mac.com> Warn when someone tries to pass a variable with a non-POD type to a varargs function/method/block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
4b1e275eb743b46cd10153bb58743d89af7242ea 07-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Don't ICE when messaging on 'super' receiver when class
of category implementation is undeclared. Issue error instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
d162584991885ab004a02573a73ce06422b921fc 24-Nov-2008 Chris Lattner <sabre@nondot.org> Change a whole lot of diagnostics to take QualType's directly
instead of converting them to strings first. This also fixes a
bunch of minor inconsistencies in the diagnostics emitted by clang
and adds a bunch of FIXME's to DiagnosticKinds.def.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
2c21a073525cdfa68e4439b7af551385dc2796ab 21-Nov-2008 Chris Lattner <sabre@nondot.org> merge some simple call diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f3a41af4d5c98a72a1d6720bbbfd658e57ef2541 20-Nov-2008 Chris Lattner <sabre@nondot.org> remove the last old-fashioned Diag method. Transition complete!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
8469265156c6344fa1100a6a7bf6349acc187d9f 20-Nov-2008 Chris Lattner <sabre@nondot.org> instead of looking up super at startup time,
just check for it when needed. It doesn't incur real cost
in any hot paths.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
5cb93b8bf009c4b0ae09b71ba85f54b2a7ea8022 19-Nov-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6150376> [sema] crash on invalid message send.

The core fix in Sema::ActOnClassMessage(). All the other changes have to do with passing down the SourceLocation for the receiver (to properly position the cursor when producing an error diagnostic).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59639 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
87d3ef08d892df8264bd51adb6ddd4a22422cd29 17-Nov-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6333904> [sema] message lookup on super is incorrect

Missing special lookup rule in Sema::ActOnInstanceMessage().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
cd9b46e5442a3ef17f83f75177d8545cb5b3e2b9 04-Nov-2008 Douglas Gregor <dgregor@apple.com> Add a new expression class, ObjCSuperExpr, to handle the Objective-C 'super'. Remove ObjCThis from PredefinedExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
6c4088e5fc0ce98bf3213d47f6f38bfbfa20c813 29-Sep-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6251012> clang: Blocks are objects too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
91e19b2029447e75d2c7730ff888cc396874685b 11-Sep-2008 Daniel Dunbar <daniel@zuster.org> Fix two bugs exposed by array passing assert:
(1) Additional arguments to variadic methods should have default
promotions applied.

(2) Additional arguments to non-variadic methods were allowed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56084 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
6660c8a4cc2115929d92be83bbc54c307002a321 11-Sep-2008 Daniel Dunbar <daniel@zuster.org> Bug fix, apply default argument promotion in message sends for which
no method declaration was found.
- This was allowing arrays to pass "by value" among other things.

Add assert in CodeGen that arguments cannot have array type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
637cebb67c59765e1412c589550c8c9ba001baeb 11-Sep-2008 Daniel Dunbar <daniel@zuster.org> Refactor common Obj-C message send checking code into
CheckMessageArgumentTypes.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
662e8b5647adbb1bc9eeceece7b64600cfa87471 15-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change Parser & Sema to use interned "super" for comparions.
- Added as private members for each because it is not clear where to
put the common definition. Perhaps the IdentifierInfos all of these
"pseudo-keywords" should be collected into one place (this would
KnownFunctionIDs and Objective-C property IDs, for example).

Remove Token::isNamedIdentifier.
- There isn't a good reason to use strcmp when we have interned
strings, and there isn't a good reason to encourage clients to do
so.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
d9f6910f4ef37c0e8eeee2a01287d9572c3176ef 10-Aug-2008 Chris Lattner <sabre@nondot.org> rename PreDefinedExpr -> PredefinedExpr



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
7c778f1c549a8ae95d50a819fd537df78da16426 25-Jul-2008 Steve Naroff <snaroff@apple.com> Cleaunup Sema::ActOnClassMessage(). This commit:
(a) removes a bogus warning.
(b) removes an undesirable usage of the ObjCMessageExpr constructor that takes an IdentifierInfo * (which I will abolish).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
fc93d52ada07d52de0ad4fd051b6a08e21d421ff 24-Jul-2008 Steve Naroff <snaroff@apple.com> Fix Sema::ActOnClassMessage() to pass through the identifier for "super".
This fixes a critical rewriter bug (<rdar://problem/6096760> clang ObjC rewriter: 'self' not expected value in class method called with 'super').

Also added a couple FIXME's since I'm not happy with my fix to Sema. It would be nicer if the super handling for class/instance messages was the same (based on PreDefinedExpr).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
6562fdad21432377f0cc5e0c627c28f0c85df4dd 21-Jul-2008 Chris Lattner <sabre@nondot.org> when in the context of an @implementation, look for private methods in the
@implementation to resolve nullary selector references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
1565e0364b05d163640dd2b6feed43bae67df4fd 21-Jul-2008 Chris Lattner <sabre@nondot.org> don't pass in null as the Name for GenerateClassStructure,
it goes and makes std::strings out of them, which is not
defined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
0b2f7ea2794bc9e8d2f8328d78d61f8ec55dd023 21-Jul-2008 Chris Lattner <sabre@nondot.org> improve diagnostics about problems with receivers to highlight the receiver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
2b1cc8be4dda4cd122485be0168b3c43d7dff15f 21-Jul-2008 Chris Lattner <sabre@nondot.org> continue cleaning up code, and disable sending a message directly to an
interface. This fixes a bug where we used to accept:

void test2(NSNumber x) {
[x METH];
}

which doesn't make sense and GCC rejects.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
fe1a553256b46fad3c0a9e9967481bcf571339ec 21-Jul-2008 Chris Lattner <sabre@nondot.org> simplify control flow a bit, reducing indentation. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
b24d9211329cab87861e25daf6e21210a862d29b 21-Jul-2008 Chris Lattner <sabre@nondot.org> tighten up some checks, don't allow sending a message to NSString****


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
c188d308ebb52a08133df442a17b3c48ace4061b 21-Jul-2008 Chris Lattner <sabre@nondot.org> merge a bunch of code that is now common between qual interfaces and interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
9baefc21bfe1bf49ab4a234e9f267f00abe0b1b1 21-Jul-2008 Chris Lattner <sabre@nondot.org> rename getProtocols -> getProtocol, as it only returns a single
protocol. Simplify some code to use unconditional form of the
protocol access list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
4df728e368fa1f65ffc57572fed613dcca5b4fe8 24-Jun-2008 Ted Kremenek <kremenek@apple.com> ObjCMessageExpr objects that represent messages to class methods now can contain the ObjCInterfaceDecl* of the target class if it was available when the ObjCMessageExpr object was constructed. The original interfaces of the class has been preserved (requiring no functionality changes from clients), but now a "getClasSInfo" method returns both the ObjCInterfaceDecl* and IdentifierInfo* of the target class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
13fd7e5111032f54b538dd66d035b0ccc1f82467 21-Jun-2008 Chris Lattner <sabre@nondot.org> "this patch adds code generation hooks for Objective-C constant strings. It also modifies Sema so that Objective-C constant strings are treated as untyped objects if the interface for the constant string class can not be found. This is consistent with Apple GCC. I thought it was consistent with GNU GCC, since this was causing failures when trying to compile GNUstep with (GNU) GCC, but it appears that this is not the case when attempting to produce a simple test case to demonstrate it. Possibly there is a way of making the error go away, but I haven't found out what it is yet."

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
0d17f6f7b1882850fa56ad38cca0ee518869255b 21-Jun-2008 Chris Lattner <sabre@nondot.org> Switch 'super' from being a weird cast thing to being a predefined expr node.
Patch by David Chisnall with objc rewriter and stmtdumper updates from me.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp
cb28be6e82809f9f514585ac2692fa04bb56978a 05-Jun-2008 Steve Naroff <snaroff@apple.com> Fix crash identified by <rdar://problem/5986085>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
fd5b2ce150185d8d8fc3d7789983bbd2b0b8103f 04-Jun-2008 Ted Kremenek <kremenek@apple.com> Added fixmes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
26631704d15e2fe19bae8a22939e0a473407c20d 04-Jun-2008 Fariborz Jahanian <fjahanian@apple.com> Fix a gcc compatibility issue which allows more protocol-qualified id on RHS to be
assigned to less protocol qualified object on LHS.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
9ad23d6f454e64b2ff960721becc5b90dea4d353 04-Jun-2008 Steve Naroff <snaroff@apple.com> Sema::ActOnClassMessage() needs to look through it's local implementation for private class methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
289d9f243d9074513368d27eef3b647f72a38324 01-Jun-2008 Steve Naroff <snaroff@apple.com> Tweak Sema::ObjCQualifiedIdTypesAreCompatible() to handle qualified interface types on the RHS.

This eliminates a bogus warning identified in the test below.

This fixes <rdar://problem/5968256> clang on xcode: error: incompatible type initializing 'NSObject<XCSelectionSource> *', expected 'id<NSObject,XCSelectionSource>'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
94a82c930278809a04976ee13013e6e980b18345 31-May-2008 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/5965704> clang: bad receiver type 'id const'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
f494b579b22f9950f5af021f0bf9879a91bb8b41 29-May-2008 Steve Naroff <snaroff@apple.com> - Move ObjC Expresssion AST's from Expr.h => ExprObjC.h
- #include ExprObjC.h in many places


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
b1698cf972be75084d760c82389ab5b49a386c31 20-Apr-2008 Chris Lattner <sabre@nondot.org> Restructure and simplify Sema::ObjCQualifiedIdTypesAreCompatible,
deleting dead code, making other code more obvious, and fixing a
bug. This fixes these (bogus) warnings in release mode:

SemaExprObjC.cpp:383: warning: 'RHSProtoE' may be used uninitialized in this function
SemaExprObjC.cpp:383: warning: 'RHSProtoI' may be used uninitialized in this function




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
eca7be6b7ebd93682eeaab2c71d59f2995dacdcc 07-Apr-2008 Chris Lattner <sabre@nondot.org> move ObjCQualifiedIdTypesAreCompatible out of ASTContext into Sema.
While it is similar to the other compatibility predicates in ASTContext,
it is not used by them and is different.

In addition, greatly simplify ObjCQualifiedIdTypesAreCompatible and
fix some canonical type bugs. Also, simplify my Type::getAsObjC* methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49313 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.cpp
987798ad1d5db2a8ec26cd5bbe434b35ad32659c 02-Apr-2008 Chris Lattner <sabre@nondot.org> properly handle array decay in objc message exprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.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/SemaExprObjC.cpp
95110968dcd6ba2baef2a23549cd5592f01eca59 28-Mar-2008 Steve Naroff <snaroff@apple.com> Make sure Sema::ActOnClassMessage() correctly diagnoses "super".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaExprObjC.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/SemaExprObjC.cpp