summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/class-conforming-protocol-2.m
Commit message (Collapse)AuthorAgeFilesLines
* Implement the newest status quo for method override checking. The idea nowJohn McCall2010-10-281-1/+1
| | | | | | | | | | | | | 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
* Only warn for mismatched types in Objective-C methods when they are ↵David Chisnall2010-10-251-4/+5
| | | | | | | | | | 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
* Method declaration and its implementation must match in all their types.Fariborz Jahanian2010-10-051-4/+4
| | | | | | | Previously, compiler warned only if it was unsafe if types did not match. Fixes // rdar: //7933061 llvm-svn: 115683
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Change tests to use clang -cc1...Fariborz Jahanian2009-12-141-1/+1
| | | | llvm-svn: 91297
* Don't warn if result/argument type of an implemented Fariborz Jahanian2009-05-141-0/+22
method is a qualified id which conforms to the matching type of its method declaration. llvm-svn: 71817
OpenPOWER on IntegriCloud