CallExpr *Cls = SynthesizeCallToFunctionDecl(GetClassFunctionDecl,
&ClsExprs[0],
ClsExprs.size());
- // To turn off a warning, type-cast to 'Class'
+ // To turn off a warning, type-cast to 'id'
InitExprs.push_back(
- new CastExpr(Context->getObjcClassType(),
+ new CastExpr(Context->getObjcIdType(),
Cls, SourceLocation())); // set 'super class', using objc_getClass().
// struct objc_super
QualType superType = getSuperStructType();
--- /dev/null
+// RUN: clang -rewrite-test %s | clang
+
+#include <objc/objc.h>
+
+@interface SUPER
+- (int) MainMethod;
+@end
+
+@interface MyDerived : SUPER
+- (int) instanceMethod;
+@end
+
+@implementation MyDerived
+- (int) instanceMethod {
+ return [super MainMethod];
+}
+@end