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 | e1378a431305a1c8f3de6322255964d9b2c11503 (patch) | |
tree | 995a1fe9751feeb71f173498ff9465119dff2dc6 /clang/lib/Rewrite/RewriteObjC.cpp | |
parent | 6d487a9b778cd2f4dd3acfe1d155a320bd1a676b (diff) | |
download | bcm5719-llvm-e1378a431305a1c8f3de6322255964d9b2c11503.tar.gz bcm5719-llvm-e1378a431305a1c8f3de6322255964d9b2c11503.zip |
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.
llvm-svn: 139403
Diffstat (limited to 'clang/lib/Rewrite/RewriteObjC.cpp')
-rw-r--r-- | clang/lib/Rewrite/RewriteObjC.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Rewrite/RewriteObjC.cpp b/clang/lib/Rewrite/RewriteObjC.cpp index 83eba54c9db..db59b518b73 100644 --- a/clang/lib/Rewrite/RewriteObjC.cpp +++ b/clang/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(); |