summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC
Commit message (Collapse)AuthorAgeFilesLines
* Guard lazy synthesis of provisional ivars under the newFariborz Jahanian2011-01-031-1/+1
| | | | | | -fobjc-default-synthesize-properties flag. llvm-svn: 122757
* Add -fobjc-default-synthesized-properties flagTed Kremenek2010-12-236-6/+6
| | | | | | | | | | | | to allow us to explicitly control whether or not Objective-C properties are default synthesized. Currently this feature only works when using the -fobjc-non-fragile-abi2 flag (so there is no functionality change), but we can now turn off this feature without turning off all the features coupled with -fobjc-non-fragile-abi2. llvm-svn: 122519
* Complain on missing property getter method onlyFariborz Jahanian2010-12-222-5/+24
| | | | | | | if property-dot expression is decidedly an rvalue. // rdar://8155806. llvm-svn: 122430
* Warn when message is sent to receiver ofFariborz Jahanian2010-12-211-0/+47
| | | | | | | | unknown type and there is a possibility that at runtime method is resolved to a deprecated or unavailable method. Addreses // rdar://8769853 llvm-svn: 122294
* Warn when synthesizing a property which isFariborz Jahanian2010-12-171-0/+13
| | | | | | | implicitly atomic under -Wimplicit-atomic-properties flag. // rdar://8774580 llvm-svn: 122095
* Improve diagnostics when property being looked upFariborz Jahanian2010-12-161-0/+11
| | | | | | in a forward @class object. // rdar://8774513 llvm-svn: 121933
* ivars craeted for explicit @synthesize and thoseFariborz Jahanian2010-12-151-2/+39
| | | | | | | created for auto-synthesis are @private. Fixes: // rdar://8769582 llvm-svn: 121913
* Enhance my implementation of //rdar ://8747333 in r121597 to allowFariborz Jahanian2010-12-111-1/+12
| | | | | | | | for declaration of property setter/getter in forward class extensions and also skip over propeties which are @dynamic. llvm-svn: 121617
* Any property declared in a class extension might have userFariborz Jahanian2010-12-101-0/+24
| | | | | | | | | | | declared setter or getter in current class extension or one of the other class extensions. Mark them as synthesized as property will be synthesized when property with same name is seen in the @implementation. This prevents bogus warning about unimplemented methods to be issued for these methods. Fixes // rdar://8747333 llvm-svn: 121597
* Added remaining objective-c library builtins (as in gcc) toFariborz Jahanian2010-12-102-4/+29
| | | | | | clang. // rdar://8735023 llvm-svn: 121441
* Diagnose when accessing property in a class method andFariborz Jahanian2010-12-031-0/+20
| | | | | | | no property accessor class method to be found, instead of crashing in IRGen. // rdar://8703553 llvm-svn: 120855
* Improve on objc diagnostics. // rdar://8721692Fariborz Jahanian2010-12-021-2/+2
| | | | llvm-svn: 120737
* When unknown method is sent to a receiver ofFariborz Jahanian2010-12-014-3/+13
| | | | | | | 'Class' type, disgnostic should refere to a class method. Fixes // rdar://8592156 llvm-svn: 120517
* Add objc_getClass as an objc builtin functionFariborz Jahanian2010-11-301-0/+4
| | | | | | | (// rdar://8592641). Also rename LANGUAGEID to LanguageID. llvm-svn: 120437
* Warn if direct accessing synthesized ivar backing the property inFariborz Jahanian2010-11-171-0/+14
| | | | | | nonofragile-abi2. Fixes //rdar://8673791 llvm-svn: 119543
* Check for duplicate declaration of a property in current andFariborz Jahanian2010-11-101-6/+7
| | | | | | other class extensions. // rdar://7629420 llvm-svn: 118689
* Propagate the deprecated and unavailable attributes from aJohn McCall2010-11-101-0/+11
| | | | | | | | | | @property declaration to the autogenerated methods. I'm uncertain whether this should apply to attributes in general, but these are a reasonable core. Implements rdar://problem/8617301 llvm-svn: 118676
* Restore patch reversed in r118475. FixesFariborz Jahanian2010-11-091-0/+3
| | | | | | // rdar://8632525 llvm-svn: 118634
* Remove this test for now.Fariborz Jahanian2010-11-091-3/+0
| | | | llvm-svn: 118476
* Remove space from rdar URIs.Fariborz Jahanian2010-11-0912-14/+14
| | | | llvm-svn: 118474
* Provide a precise builtin declaration for objc_msgSendFariborz Jahanian2010-11-081-0/+3
| | | | | | to avoid a bogus warning. Fixes //rdar: //8632525 llvm-svn: 118451
* Restore patch for PR8453 which was undone in r117829Fariborz Jahanian2010-11-011-0/+34
| | | | | | (was project bugs). llvm-svn: 117951
* Revert r117678, "Qualified 'id' should implement all of static class ↵Daniel Dunbar2010-10-301-34/+0
| | | | | | type's", it breaks things. llvm-svn: 117829
* Improve diagnostics reporting of un-implementedFariborz Jahanian2010-10-296-23/+30
| | | | | | | methods in protocols when protocols are in system headers and thus ignored. //rdar: //8227199 llvm-svn: 117739
* Qualified 'id' should implement all of static class type'sFariborz Jahanian2010-10-291-0/+34
| | | | | | | | protocols, including those added to class, super class and categories; otherewise issue a warning. This fixes pr8453. llvm-svn: 117678
* Implement the newest status quo for method override checking. The idea nowJohn McCall2010-10-287-20/+68
| | | | | | | | | | | | | is that we need more information to decide the exact conditions for whether one ObjCObjectPointer is an acceptable return/parameter override for another, so we're going to disable that entire class of warning for now. The "forward developement" warning category, -Wmethod-signatures, can receive unrestricted feature work, and when we're happy with how it acts, we'll turn it on by default. This is a pretty conservative change, and nobody's totally content with it. llvm-svn: 117524
* Pending further discussion, re-enable warnings for Objective CJohn McCall2010-10-263-6/+51
| | | | | | | | | | | covariant/contravariant overrides and implementations, but do so under control of a new flag (-Wno-objc-covariant-overrides, which yes does cover contravariance too). *At least* the covariance cases will probably be enabled by default shortly, but that's not totally uncontroversial. llvm-svn: 117346
* Only warn for mismatched types in Objective-C methods when they are ↵David Chisnall2010-10-253-6/+28
| | | | | | | | | | incompatible, not when they are simply different. Now we test whether the difference in types breaks the principle of substitutability, rather than whether they are different. A common idiom in Objective-C is to provide a definition of a method in a subclass that returns a more-specified version of an object than the superclass. This does not violate the principle of substitutability, because you can always use the object returned by the subclass anywhere that you could use the type returned by the superclass. It was, however, generating warnings with clang, leading people to believe that semantically correct code was incorrect and requiring less accurate type specification and explicit down-casts (neither of which is a good thing to encourage). This change ensures that any method definition has parameter and return types that make it accept anything that something conforming to the declaration may pass and return something that the caller will expect, but allows stricter definitions. llvm-svn: 117271
* Tweak diagnostics for redeclaration of a @property in a class extension ↵Ted Kremenek2010-10-212-6/+8
| | | | | | | | | | where the redelcaration and original declaration have the 'readwrite' attribute. This is a common case, and we can issue a more lucid diagnostic. Fixes <rdar://problem/7629420>. llvm-svn: 117045
* Fix handling of property and ivar lookup in typo correction; the twoDouglas Gregor2010-10-202-2/+2
| | | | | | | kinds of lookup into Objective-C classes were tangled together, a situation that was compounded by automatically synthesized ivars. llvm-svn: 116907
* Introduce a simple cache for unqualified typo corrections, so that weDouglas Gregor2010-10-201-2/+2
| | | | | | | | | | | don't repeatedly loop through identifiers, correcting the same typo'd identifier over and over again. We still bail out after 20 typo corrections, but this should help improve performance in the common case where we're typo-correcting because the user forgot to include a header. llvm-svn: 116901
* Fixes a bug in ivar lookup in the new objc's defaultFariborz Jahanian2010-10-191-0/+43
| | | | | | | property synthesis mode, when dealing with legacy code. Fixes //rdar: //8565343. llvm-svn: 116846
* When performing typo correction, keep track of whether the last lookupDouglas Gregor2010-10-151-1/+1
| | | | | | | | | we did was an acceptable lookup. If it is, then we can re-use that lookup result. If it isn't, we have to perform the lookup again. This is almost surely the cause behind the mysterious typo.m failures on some builders; we were getting the wrong lookup results returned. llvm-svn: 116586
* When performing typo correction, look through the set of knownDouglas Gregor2010-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 116528
* This patch does a few things in the area of objective-cFariborz Jahanian2010-10-112-1/+20
| | | | | | | | | | | properties. 1. Generates the AST for lexical info. of accessing getter/setter methods using dot-syntax notation. This fixes //rdar: //8528170. 2. Modifes rewriter to handle the AST putout in 1. 3. Supportes in rewriter ObjCImplicitSetterGetter ASTs. llvm-svn: 116237
* Rename test name.Fariborz Jahanian2010-10-081-0/+0
| | | | llvm-svn: 116120
* Method implemented in class's implementation may implementFariborz Jahanian2010-10-081-0/+20
| | | | | | | | | one declared in class's extension and not one declared in class's superclass. This supresses a bogus warning on method type mismatch. Fixes //rdar: // 8530080 llvm-svn: 116118
* Method declaration and its implementation must match in all their types.Fariborz Jahanian2010-10-054-8/+44
| | | | | | | Previously, compiler warned only if it was unsafe if types did not match. Fixes // rdar: //7933061 llvm-svn: 115683
* Patch to support transparent_union argumentsFariborz Jahanian2010-09-271-0/+19
| | | | | | | passed to nonnull attributed functions. Implements radar 6857843. llvm-svn: 114917
* Issue warning for trivial cases of nonnull attributesFariborz Jahanian2010-09-272-2/+7
| | | | | | | | | (on functions with no pointer arguments) but only when the attribute has not been coming from a macro instantiation in a header file. Fixes first part of radar 6857843. llvm-svn: 114860
* Revert r114316, -Wunused-value enabled by default was intended.Argyrios Kyrtzidis2010-09-191-1/+1
| | | | llvm-svn: 114318
* Make -Wunused-value off by default, matching GCC. Fixes rdar://7126194.Argyrios Kyrtzidis2010-09-191-1/+1
| | | | llvm-svn: 114316
* When we run into an error parsing or type-checking the left-hand sideDouglas Gregor2010-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | of a binary expression, continue on and parse the right-hand side of the binary expression anyway, but don't call the semantic actions to type-check. Previously, we would see the error and then, effectively, skip tokens until the end of the statement. The result should be more useful recovery, both in the normal case (we'll actually see errors beyond the first one in a statement), but it also helps code completion do a much better job, because we do "real" code completion on the right-hand side of an invalid binary expression rather than completing with the recovery completion. For example, given x = p->y if there is no variable named "x", we can still complete after the p-> as a member expression. Along the recovery path, we would have completed after the "->" as if we were in an expression context, which is mostly useless. llvm-svn: 114225
* Diagnose use of incomplete type on method argument type ofFariborz Jahanian2010-09-171-0/+14
| | | | | | | method definitions instead of crashing in code gen. Fixes radar 8421082. llvm-svn: 114223
* fix rdar://8445858 - __sync_* intrinsics erroneously reject ObjC pointersChris Lattner2010-09-171-0/+10
| | | | llvm-svn: 114209
* Relax __attribute_((nonnull)) checking to allow the attribute on functions ↵Ted Kremenek2010-09-091-2/+2
| | | | | | | | with no pointer arguments. GCC doesn't warn in this case, and the attribute is trivially satisfied (and benign). Fixes <rdar://problem/8364828>. llvm-svn: 113464
* Test removed.Fariborz Jahanian2010-09-081-20/+0
| | | | llvm-svn: 113428
* Fix a crash when overloading id with objc_object*.Fariborz Jahanian2010-09-081-0/+20
| | | | | | Radar 8400356. llvm-svn: 113397
* "const id<NSFoo> *" instead of "id<NSFoo> const *".Chris Lattner2010-09-051-2/+2
| | | | | | I think this wraps up all the legal cases. llvm-svn: 113096
* 'const std::type_info*' instead of 'std::type_info const*'Chris Lattner2010-09-051-1/+1
| | | | llvm-svn: 113092
OpenPOWER on IntegriCloud