Home | History | Annotate | Download | only in SemaObjCXX
      1 // RUN: %clang_cc1 -fsyntax-only -verify %s
      2 
      3 @protocol NSTextViewDelegate;
      4 
      5 @interface NSResponder @end
      6 
      7 class AutoreleaseObject
      8 {
      9 public:
     10  AutoreleaseObject();
     11  ~AutoreleaseObject();
     12 
     13 
     14  AutoreleaseObject& operator=(NSResponder* inValue);
     15  AutoreleaseObject& operator=(const AutoreleaseObject& inValue);
     16 
     17  AutoreleaseObject(const AutoreleaseObject& inValue);
     18 
     19  operator NSResponder*() const;
     20 };
     21 
     22 
     23 void InvokeSaveFocus()
     24 {
     25  AutoreleaseObject mResolvedFirstResponder;
     26  id<NSTextViewDelegate> Mydelegate;
     27  mResolvedFirstResponder = static_cast<NSResponder*>(Mydelegate);
     28 }
     29 
     30