Fariborz Jahanian
a895c38928
Put line number on the diagnostic. //rdar: //8550657.
...
llvm-svn: 116519
2010-10-14 21:30:10 +00:00
Anders Carlsson
fe15a78ff2
Use ParseObjCSelectorPiece for parsing getter and setter names in @property declarations. Fixes PR8169.
...
llvm-svn: 115411
2010-10-02 17:45:21 +00:00
Anders Carlsson
0e523cba82
Rename a test in preparation for fixing PR8169.
...
llvm-svn: 115410
2010-10-02 17:08:38 +00:00
Douglas Gregor
1ba435f0f9
When we have two identifiers in a row in Objective-C, make sure to
...
verify that we aren't in a message-send expression before digging into
the identifier or looking ahead more tokens. Fixes a regression
(<rdar://problem/8483253>) I introduced with bracket insertion.
llvm-svn: 114968
2010-09-28 17:48:56 +00:00
Fariborz Jahanian
e89d03f619
property reference expression used on lhs of assignment
...
follows objective's semantics and is not overload'able
with an assignment operator. Fixes a crash and a missing
diagnostics. Radar 8379892.
llvm-svn: 113555
2010-09-09 23:01:10 +00:00
Fariborz Jahanian
d4ec16ca71
Removed test case.
...
llvm-svn: 113418
2010-09-08 21:55:57 +00:00
Fariborz Jahanian
db45278cbd
Reverse r113397 until we decide what to do with
...
use of 'struct objc_object*' for 'is' (and others)
in clang.
llvm-svn: 113414
2010-09-08 21:36:35 +00:00
Fariborz Jahanian
40efc0feb4
Fix a crash when overloading id with objc_object*.
...
Radar 8400356.
llvm-svn: 113397
2010-09-08 20:08:18 +00:00
Chris Lattner
938cebc076
"const id<NSFoo> *" instead of "id<NSFoo> const *".
...
I think this wraps up all the legal cases.
llvm-svn: 113096
2010-09-05 00:43:21 +00:00
Chris Lattner
53fa04909c
make clang print types as "const int *" instead of "int const*",
...
which is should have done from the beginning. As usual, the most
fun with this sort of change is updating all the testcases.
llvm-svn: 113090
2010-09-05 00:04:01 +00:00
Fariborz Jahanian
0389df4a45
Patch to allow alternative representation of c++
...
operators (and, or, etc.) to be used as selectors
to match g++'s behavior.
llvm-svn: 112935
2010-09-03 01:26:16 +00:00
Fariborz Jahanian
161848a030
ObjClang++: Allow declaration of block variable in a collection
...
statement header (fixes radar 8295106).
llvm-svn: 112443
2010-08-29 17:20:53 +00:00
Gabor Greif
e6523ea915
suppress annoying textual repetition as 'aka'
...
llvm-svn: 112365
2010-08-28 10:40:52 +00:00
Chris Lattner
1ba644575d
handle :: in selectors in objc++ mode, rdar://8366474
...
llvm-svn: 112307
2010-08-27 22:32:41 +00:00
Argyrios Kyrtzidis
421ad5e1e6
In Sema::AddBuiltinOperatorCandidates, candidate pointer types set can also contain a ObjCObjectPointerType since r111699.
...
Don't assume that they are only PointerTypes or we will crash.
llvm-svn: 111798
2010-08-23 07:12:16 +00:00
Fariborz Jahanian
7a3f3a0402
Contributed test case for PR7936
...
by Jean-Daniel Dupas.
llvm-svn: 111700
2010-08-21 00:17:33 +00:00
Fariborz Jahanian
e4151b590e
patch to support comparison involving
...
objctive-c pointer conversions. Fixes pr7936.
llvm-svn: 111699
2010-08-21 00:10:36 +00:00
Fariborz Jahanian
68e69ca9f9
Patch to issue warning when colllection expresion's type
...
does not implement 'countByEnumeratingWithState' API.
Implements radar 7634669.
llvm-svn: 110964
2010-08-12 22:25:42 +00:00
Fariborz Jahanian
6fdc171414
Fix test to not depend on objc.h header.
...
llvm-svn: 110729
2010-08-10 20:59:58 +00:00
Fariborz Jahanian
d52543ee22
an objective-c++ test for -Wstrict-selector-match
...
(radar 8127244).
llvm-svn: 110702
2010-08-10 18:32:37 +00:00
Douglas Gregor
22da8ebafc
Add some more tests for reference binding of Objective-C objects
...
llvm-svn: 110514
2010-08-07 11:56:45 +00:00
Douglas Gregor
8b2d2fe234
Allow reference binding of a reference of Objective-C object type to
...
an lvalue of another, compatible Objective-C object type (e.g., a
subclass). Introduce a new initialization sequence step kind to
describe this binding, along with a new cast kind. Fixes PR7741.
llvm-svn: 110513
2010-08-07 11:51:51 +00:00
John McCall
dc9796e23a
Properly pop out of Objective-C method declarations when they are (ill-formedly)
...
found within contexts other than the translation unit.
llvm-svn: 110417
2010-08-06 00:46:05 +00:00
John McCall
da518417fa
Permit template argument deduction to add qualifiers within ObjC object
...
pointers like it can with normal and member pointers.
llvm-svn: 110313
2010-08-05 05:30:45 +00:00
Douglas Gregor
0bdcb8a239
When taking the address of a value of Objective-C object type (e.g.,
...
one because we're referencing a variable of type NSString &), the
resulting type is an ObjCObjectPointerType.
llvm-svn: 109753
2010-07-29 16:05:45 +00:00
John McCall
2ca705eb13
Support catching Objective C pointers in C++ under the non-fragile NeXT runtime.
...
Diagnose attempts to do this under the GNU or fragile NeXT runtimes.
llvm-svn: 109298
2010-07-24 00:37:23 +00:00
Douglas Gregor
fb0c0d37b7
Extend the "cannot convert from base class pointer to derived class
...
pointer" diagnostic to handle references, too.
llvm-svn: 107372
2010-07-01 02:14:45 +00:00
Douglas Gregor
56f2e34a6a
Improve diagnostic when we fail to pick an overload because it would
...
require a base-to-derived pointer conversion.
llvm-svn: 107349
2010-06-30 23:01:39 +00:00
Daniel Dunbar
8452ef0798
tests: Use %clangxx when using driver for C++, in case C++ support is disabled.
...
llvm-svn: 107153
2010-06-29 16:52:24 +00:00
Douglas Gregor
f7d7771812
Fix the recently-added warning about 'typename' and 'template'
...
disambiguation keywords outside of templates in C++98/03. Previously,
the warning would fire when the associated nested-name-specifier was
not dependent, but that was a misreading of the C++98/03 standard:
now, we complain only when we're outside of any template.
llvm-svn: 106161
2010-06-16 22:31:08 +00:00
Fariborz Jahanian
1d44608cc1
Make sure result type of objc++ message expression is
...
complete before attempting to bind it to a temporary.
Fixes PR7386.
llvm-svn: 106130
2010-06-16 18:56:04 +00:00
Douglas Gregor
c9d2682df3
Warn when a 'typename' or a 'template' keyword refers to a
...
non-dependent type or template name, respectively, in C++98/03. Fixes
PR7111 and <rdar://problem/8002682>.
llvm-svn: 105968
2010-06-14 22:07:54 +00:00
John McCall
6d1116ac49
Conversions from Objective C object pointers to bool are "pointer conversions
...
to bool" in the sense of C++ [over.ics.rank]p4 bullet 1. I have decreed it.
llvm-svn: 105817
2010-06-11 10:04:22 +00:00
Douglas Gregor
959d5a0cbd
Implement support for variable length arrays in C++. VLAs are limited
...
in several important ways:
- VLAs of non-POD types are not permitted.
- VLAs cannot be used in conjunction with C++ templates.
These restrictions are intended to keep VLAs out of the parts of the
C++ type system where they cause the most trouble. Fixes PR5678 and
<rdar://problem/8013618>.
llvm-svn: 104443
2010-05-22 16:17:30 +00:00
Douglas Gregor
3e51e173b6
Reinstate r104117, Chandler Carruth's change that "[provides] a naming
...
class for UnresolvedLookupExprs, even when occuring on template
names" along with a fix for an Objective-C++ crasher it introduced.
llvm-svn: 104277
2010-05-20 20:58:56 +00:00
Douglas Gregor
527786ea3a
Various small fixes for construction/destruction of Objective-C++
...
instance variables:
- Use isRecordType() rather than isa<RecordType>(), so that we see
through typedefs in ivar types.
- Mark the destructor as referenced
- Perform C++ access control on the destructor
llvm-svn: 104206
2010-05-20 02:24:22 +00:00
Fariborz Jahanian
f633ebd961
Adds support for ObjC++'s GC attribute on declaration of
...
object variables and functions returning such objects.
llvm-svn: 104168
2010-05-19 21:37:30 +00:00
John McCall
0e704f7fcd
Permit Objective C object pointers to be const_casted.
...
llvm-svn: 104019
2010-05-18 09:35:29 +00:00
John McCall
8b07ec253d
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.
llvm-svn: 103870
2010-05-15 11:32:37 +00:00
Fariborz Jahanian
1bd96d13b2
Objective-C++ Sema. Fix a bug in instantiation of receivers.
...
Completes radar 7963410.
llvm-svn: 103719
2010-05-13 17:19:25 +00:00
John McCall
01f21ad97c
Rebuild builtin_id * as an ObjCObjectPointerType, where builtin_id is the
...
magic type that 'id' is a pointer to.
llvm-svn: 103708
2010-05-13 08:39:13 +00:00
John McCall
bb4ea81ab9
When performing template argument deduction, match Objective C pointers
...
against pointer patterns.
llvm-svn: 103706
2010-05-13 07:48:05 +00:00
Fariborz Jahanian
cac49a8f8a
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.
llvm-svn: 103672
2010-05-12 23:29:11 +00:00
Fariborz Jahanian
b0901b7951
Objective-C++ Sema - Allow static_cast of one objc pointer to
...
another.
llvm-svn: 103630
2010-05-12 18:16:59 +00:00
Fariborz Jahanian
eee1669adb
Allow static_cast to objective-c pointers.
...
Fixes radar 7952457.
llvm-svn: 103447
2010-05-10 23:46:53 +00:00
Fariborz Jahanian
ce7ddf7bf7
Test for my last patch.
...
llvm-svn: 102956
2010-05-03 21:06:59 +00:00
Fariborz Jahanian
0103d67f98
Diagnose declaration of reference typed ivars.
...
llvm-svn: 102390
2010-04-26 22:07:03 +00:00
Douglas Gregor
b7e20eb883
Implement template instantiation for implicit property references in
...
Objective-C++. This is the last bit of (non-blocks-related) template
instantiation logic for Objective-C++. Yay!
llvm-svn: 102382
2010-04-26 21:04:54 +00:00
Douglas Gregor
9faee21f67
Implement template instantiation for ObjCPropertyRefExpr.
...
llvm-svn: 102379
2010-04-26 20:47:02 +00:00
Douglas Gregor
d51d90dd04
Implement template instantiation for value-dependent Objective-C ivar
...
references and isa expressions. Also, test template instantiation of
unresolved member references to Objective-C ivar references and isa
expressions.
llvm-svn: 102374
2010-04-26 20:11:03 +00:00