summaryrefslogtreecommitdiff
path: root/clang/test/SemaObjC/ignore-qualifier-on-qualified-id.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaObjC/ignore-qualifier-on-qualified-id.m')
-rw-r--r--clang/test/SemaObjC/ignore-qualifier-on-qualified-id.m21
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/ignore-qualifier-on-qualified-id.m b/clang/test/SemaObjC/ignore-qualifier-on-qualified-id.m
new file mode 100644
index 0000000..36a2c1a
--- /dev/null
+++ b/clang/test/SemaObjC/ignore-qualifier-on-qualified-id.m
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify %s
+// rdar://10667659
+
+@protocol NSCopying @end
+
+@interface NSString <NSCopying>
+@end
+
+void takeId(id test) {}
+
+void takeCopyableId(id<NSCopying> test) {}
+
+id<NSCopying> Test () {
+ NSString const *constantString = @"Test";
+ takeId(constantString);
+ takeCopyableId(constantString);
+ id ID = constantString;
+ id<NSCopying> IDQNSCopying = constantString;
+ return constantString;
+}