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 | 314cc81b8caacd6f9b3f74c4e32ac9403d8d4052 (patch) | |
tree | 4f031e0740266d6687313f6792788bb5af6352a0 /clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | 68855fe3c912c1cf183fe01621ea4f38a2dd7752 (diff) | |
download | bcm5719-llvm-314cc81b8caacd6f9b3f74c4e32ac9403d8d4052.tar.gz bcm5719-llvm-314cc81b8caacd6f9b3f74c4e32ac9403d8d4052.zip |
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
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index 438798433c1..a434e20634d 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -1217,7 +1217,7 @@ static QualType adjustFunctionTypeForInstantiation(ASTContext &Context, 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 @@ static void InstantiateExceptionSpec(Sema &SemaRef, FunctionDecl *New, 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 @@ void Sema::InstantiateExceptionSpec(SourceLocation PointOfInstantiation, // 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 @@ TemplateDeclInstantiator::InitFunctionInstantiation(FunctionDecl *New, 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 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, // 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()) |