Home | History | Annotate | Download | only in SemaObjC
      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 
     11 void takeId(id test) {}
     12 
     13 void takeCopyableId(id<NSCopying> test) {}
     14 
     15 id<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