diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-09-09 20:35:22 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-09-09 20:35:22 +0000 |
commit | 88914801a4d73e321c6f74f97df7d7b11c298bc6 (patch) | |
tree | 1e6b4f67a8a3bcd41f02ba7de6886c258c27a3a3 /lib/Rewrite/RewriteObjC.cpp | |
parent | 5c16d635ff67fd8f083a704b7c82607ed49a8ba2 (diff) |
objc rewriter - Add rewriter test for new instancetype
along with minor rewriter fix to handle that. This
test is still incomplete due to rewriter issues
unrelated to instancetype.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139403 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/RewriteObjC.cpp')
-rw-r--r-- | lib/Rewrite/RewriteObjC.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Rewrite/RewriteObjC.cpp b/lib/Rewrite/RewriteObjC.cpp index 83eba54c9d..db59b518b7 100644 --- a/lib/Rewrite/RewriteObjC.cpp +++ b/lib/Rewrite/RewriteObjC.cpp @@ -465,6 +465,8 @@ namespace { const QualType *args, unsigned numArgs, bool variadic = false) { + if (result == Context->getObjCInstanceType()) + result = Context->getObjCIdType(); FunctionProtoType::ExtProtoInfo fpi; fpi.Variadic = variadic; return Context->getFunctionType(result, args, numArgs, fpi); @@ -970,7 +972,7 @@ void RewriteObjC::RewriteForwardClassDecl( void RewriteObjC::RewriteMethodDeclaration(ObjCMethodDecl *Method) { // When method is a synthesized one, such as a getter/setter there is // nothing to rewrite. - if (Method->isSynthesized()) + if (Method->isImplicit()) return; SourceLocation LocStart = Method->getLocStart(); SourceLocation LocEnd = Method->getLocEnd(); |