1// RUN: %clang_cc1 -fsyntax-only -verify %s 2// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify %s 3// expected-no-diagnostics 4// rdar://10667659 5 6@protocol NSCopying @end 7 8@interface NSString <NSCopying> 9@end 10 11void takeId(id test) {} 12 13void takeCopyableId(id<NSCopying> test) {} 14 15id<NSCopying> Test () { 16 NSString const *constantString = @"Test"; 17 takeId(constantString); 18 takeCopyableId(constantString); 19 id ID = constantString; 20 id<NSCopying> IDQNSCopying = constantString; 21 return constantString; 22} 23