diff options
author | Alp Toker <alp@nuanti.com> | 2014-01-25 16:55:45 +0000 |
---|---|---|
committer | Alp Toker <alp@nuanti.com> | 2014-01-25 16:55:45 +0000 |
commit | 37545f747c61382bbf5291d28a47fef6fc4d2d0e (patch) | |
tree | d2e58c43721336cda82aa7e36b49ce3aa10e34fe /lib/Sema/SemaPseudoObject.cpp | |
parent | 1c42a7d28ea54606d2edde52789b4b55bb27a561 (diff) |
Rename getResultType() on function and method declarations to getReturnType()
A return type is the declared or deduced part of the function type specified in
the declaration.
A result type is the (potentially adjusted) type of the value of an expression
that calls the function.
Rule of thumb:
* Declarations have return types and parameters.
* Expressions have result types and arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200082 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaPseudoObject.cpp')
-rw-r--r-- | lib/Sema/SemaPseudoObject.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/lib/Sema/SemaPseudoObject.cpp b/lib/Sema/SemaPseudoObject.cpp index 1301ae32f1..81657e366e 100644 --- a/lib/Sema/SemaPseudoObject.cpp +++ b/lib/Sema/SemaPseudoObject.cpp @@ -540,7 +540,7 @@ bool ObjCPropertyOpBuilder::isWeakProperty() const { T = Prop->getType(); } else if (Getter) { - T = Getter->getResultType(); + T = Getter->getReturnType(); } else { return false; } @@ -813,7 +813,7 @@ bool ObjCPropertyOpBuilder::tryBuildGetOfReference(Expr *op, assert(Getter && "property has no setter and no getter!"); // Only do this if the getter returns an l-value reference type. - QualType resultType = Getter->getResultType(); + QualType resultType = Getter->getReturnType(); if (!resultType->isLValueReferenceType()) return false; result = buildRValueOperation(op); @@ -1170,7 +1170,7 @@ bool ObjCSubscriptOpBuilder::findAtIndexGetter() { diag::note_parameter_type) << T; return false; } - QualType R = AtIndexGetter->getResultType(); + QualType R = AtIndexGetter->getReturnType(); if (!R->isObjCObjectPointerType()) { S.Diag(RefExpr->getKeyExpr()->getExprLoc(), diag::err_objc_indexing_method_result_type) << R << arrayRef; @@ -1237,18 +1237,15 @@ bool ObjCSubscriptOpBuilder::findAtIndexSetter() { BaseT->isObjCQualifiedIdType()); if (!AtIndexSetter && S.getLangOpts().DebuggerObjCLiteral) { - TypeSourceInfo *ResultTInfo = 0; + TypeSourceInfo *ReturnTInfo = 0; QualType ReturnType = S.Context.VoidTy; - AtIndexSetter = ObjCMethodDecl::Create(S.Context, SourceLocation(), - SourceLocation(), AtIndexSetterSelector, - ReturnType, - ResultTInfo, - S.Context.getTranslationUnitDecl(), - true /*Instance*/, false/*isVariadic*/, - /*isPropertyAccessor=*/false, - /*isImplicitlyDeclared=*/true, /*isDefined=*/false, - ObjCMethodDecl::Required, - false); + AtIndexSetter = ObjCMethodDecl::Create( + S.Context, SourceLocation(), SourceLocation(), AtIndexSetterSelector, + ReturnType, ReturnTInfo, S.Context.getTranslationUnitDecl(), + true /*Instance*/, false /*isVariadic*/, + /*isPropertyAccessor=*/false, + /*isImplicitlyDeclared=*/true, /*isDefined=*/false, + ObjCMethodDecl::Required, false); SmallVector<ParmVarDecl *, 2> Params; ParmVarDecl *object = ParmVarDecl::Create(S.Context, AtIndexSetter, SourceLocation(), SourceLocation(), |