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.
llvm-svn: 200082
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 4387984..a434e20 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -1217,7 +1217,7 @@
FunctionProtoType::ExtProtoInfo NewEPI = NewFunc->getExtProtoInfo();
NewEPI.ExtInfo = OrigFunc->getExtInfo();
- return Context.getFunctionType(NewFunc->getResultType(),
+ return Context.getFunctionType(NewFunc->getReturnType(),
NewFunc->getParamTypes(), NewEPI);
}
@@ -3160,7 +3160,7 @@
EPI.Exceptions = Exceptions.data();
EPI.NoexceptExpr = NoexceptExpr;
- New->setType(SemaRef.Context.getFunctionType(NewProto->getResultType(),
+ New->setType(SemaRef.Context.getFunctionType(NewProto->getReturnType(),
NewProto->getParamTypes(), EPI));
}
@@ -3177,7 +3177,7 @@
// so that our callers don't have to cope with EST_Uninstantiated.
FunctionProtoType::ExtProtoInfo EPI = Proto->getExtProtoInfo();
EPI.ExceptionSpecType = EST_None;
- Decl->setType(Context.getFunctionType(Proto->getResultType(),
+ Decl->setType(Context.getFunctionType(Proto->getReturnType(),
Proto->getParamTypes(), EPI));
return;
}
@@ -3262,7 +3262,7 @@
EPI.ExceptionSpecDecl = New;
EPI.ExceptionSpecTemplate = ExceptionSpecTemplate;
New->setType(SemaRef.Context.getFunctionType(
- NewProto->getResultType(), NewProto->getParamTypes(), EPI));
+ NewProto->getReturnType(), NewProto->getParamTypes(), EPI));
} else {
::InstantiateExceptionSpec(SemaRef, New, Proto, TemplateArgs);
}
@@ -3390,10 +3390,10 @@
// initializer or return value, and class template specializations, other
// explicit instantiation declarations have the effect of suppressing the
// implicit instantiation of the entity to which they refer.
- if (Function->getTemplateSpecializationKind()
- == TSK_ExplicitInstantiationDeclaration &&
+ if (Function->getTemplateSpecializationKind() ==
+ TSK_ExplicitInstantiationDeclaration &&
!PatternDecl->isInlined() &&
- !PatternDecl->getResultType()->getContainedAutoType())
+ !PatternDecl->getReturnType()->getContainedAutoType())
return;
if (PatternDecl->isInlined())