summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-05-14 23:52:54 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-05-14 23:52:54 +0000
commit0c20bddc417134f88c3cf52de6bdca7276bef10b (patch)
treef51b268754b730b3fdf7e473eca61500b6551fc7 /clang/test
parent0555e5fbcedd2fada5c709996b9a1bda3f0895f7 (diff)
downloadbcm5719-llvm-0c20bddc417134f88c3cf52de6bdca7276bef10b.tar.gz
bcm5719-llvm-0c20bddc417134f88c3cf52de6bdca7276bef10b.zip
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. llvm-svn: 71817
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaObjC/class-conforming-protocol-2.m22
-rw-r--r--clang/test/SemaObjC/method-conflict.m5
2 files changed, 24 insertions, 3 deletions
diff --git a/clang/test/SemaObjC/class-conforming-protocol-2.m b/clang/test/SemaObjC/class-conforming-protocol-2.m
new file mode 100644
index 00000000000..7b218bdbd80
--- /dev/null
+++ b/clang/test/SemaObjC/class-conforming-protocol-2.m
@@ -0,0 +1,22 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+@protocol NSWindowDelegate @end
+
+@interface NSWindow
+- (void)setDelegate:(id <NSWindowDelegate>)anObject;
+- (id <NSWindowDelegate>) delegate;
+@end
+
+@protocol IBStringsTableWindowDelegate <NSWindowDelegate>
+@end
+
+@interface IBStringsTableWindow : NSWindow {}
+@end
+
+@implementation IBStringsTableWindow
+- (void)setDelegate:(id <IBStringsTableWindowDelegate>)delegate {
+}
+- (id <IBStringsTableWindowDelegate>)delegate {
+ return 0;
+}
+@end
diff --git a/clang/test/SemaObjC/method-conflict.m b/clang/test/SemaObjC/method-conflict.m
index 1524fbae56c..7a9b9f0beee 100644
--- a/clang/test/SemaObjC/method-conflict.m
+++ b/clang/test/SemaObjC/method-conflict.m
@@ -40,7 +40,7 @@ typedef NSUInteger XDSourceLanguage;
@end @class XDSCOperation;
@interface XDSCClassFormatter : NSObject {
}
-+ (NSUInteger) compartmentsForClassifier: (id <XDUMLClassifier>) classifier withSpecification: (XDSCDisplaySpecification *) displaySpec; // expected-note {{previous definition is here}}
++ (NSUInteger) compartmentsForClassifier: (id <XDUMLClassifier>) classifier withSpecification: (XDSCDisplaySpecification *) displaySpec;
@end
@class NSString;
@implementation XDSCClassFormatter
@@ -48,7 +48,6 @@ typedef NSUInteger XDSourceLanguage;
+ appendVisibility: (id <XDUMLNamedElement>) element withSpecification: (XDSCDisplaySpecification *) displaySpec to: (NSMutableAttributedString *) attributedString
{
}
-// GCC doesn't currently warn about this.
-+ (NSUInteger) compartmentsForClassifier: (id <XDSCClassifier>) classifier withSpecification: (XDSCDisplaySpecification *) displaySpec { // expected-warning {{conflicting parameter types in implementation of 'compartmentsForClassifier:withSpecification:': 'id<XDUMLClassifier>' vs 'id<XDSCClassifier>'}}
++ (NSUInteger) compartmentsForClassifier: (id <XDSCClassifier>) classifier withSpecification: (XDSCDisplaySpecification *) displaySpec {
}
@end
OpenPOWER on IntegriCloud