diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-08 14:59:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-08 14:59:44 +0000 |
commit | 4bc1cb6aa635a5bf8fae99bf69c56c724c1e786c (patch) | |
tree | 0edb8f90c13b29d2ee1e9ad4faf1420616d3684f /lib/Sema/SemaDeclObjC.cpp | |
parent | a48b2846153dc1f6c35f9e8812975a661ab1bc79 (diff) |
Keep track of type source information in the return type of an
Objective-C method declaration, e.g., for
- (Foo *)myMethod;
we now have TypeSourceInfo for the Foo*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 149fe15fab..762ef38c97 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -1681,7 +1681,7 @@ void Sema::ProcessPropertyDecl(ObjCPropertyDecl *property, // for this class. GetterMethod = ObjCMethodDecl::Create(Context, property->getLocation(), property->getLocation(), property->getGetterName(), - property->getType(), CD, true, false, true, + property->getType(), 0, CD, true, false, true, (property->getPropertyImplementation() == ObjCPropertyDecl::Optional) ? ObjCMethodDecl::Optional : @@ -1703,7 +1703,7 @@ void Sema::ProcessPropertyDecl(ObjCPropertyDecl *property, SetterMethod = ObjCMethodDecl::Create(Context, property->getLocation(), property->getLocation(), property->getSetterName(), - Context.VoidTy, CD, true, false, true, + Context.VoidTy, 0, CD, true, false, true, (property->getPropertyImplementation() == ObjCPropertyDecl::Optional) ? ObjCMethodDecl::Optional : @@ -1992,8 +1992,9 @@ Sema::DeclPtrTy Sema::ActOnMethodDeclaration( } QualType resultDeclType; + TypeSourceInfo *ResultTInfo = 0; if (ReturnType) { - resultDeclType = GetTypeFromParser(ReturnType); + resultDeclType = GetTypeFromParser(ReturnType, &ResultTInfo); // Methods cannot return interface types. All ObjC objects are // passed by reference. @@ -2007,6 +2008,7 @@ Sema::DeclPtrTy Sema::ActOnMethodDeclaration( ObjCMethodDecl* ObjCMethod = ObjCMethodDecl::Create(Context, MethodLoc, EndLoc, Sel, resultDeclType, + ResultTInfo, cast<DeclContext>(ClassDecl), MethodType == tok::minus, isVariadic, false, |