]> granicus.if.org Git - clang/commitdiff
Contributed test case for PR7936
authorFariborz Jahanian <fjahanian@apple.com>
Sat, 21 Aug 2010 00:17:33 +0000 (00:17 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Sat, 21 Aug 2010 00:17:33 +0000 (00:17 +0000)
by Jean-Daniel Dupas.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111700 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaObjCXX/conversion-to-objc-pointer-2.mm

index 5277d101f588c73a396a5eeebe57737a5b1d8174..b03d4d89e92071a096a75b8782aa5eb0c0eb8924 100644 (file)
@@ -82,6 +82,7 @@ int main (int argc, const char * argv[]) {
        TNSAutoRef<NSObject*> object2([[NSObject alloc] init]);
        TNSAutoRef<TBar*> bar([[TBar alloc] init]);
        [bar setBlah: object1];                         // <== Does not compile.  It should.
-       [bar setBlah: object2];                         // <== Does not compile.  It should.
+        if (object1 == object2)
+         [bar setBlah: object2];                               // <== Does not compile.  It should.
        return 0;
 }