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/AST/Expr.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/AST/Expr.cpp')
-rw-r--r-- | clang/lib/AST/Expr.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 154aa4c5380..e4b670dae7a 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -588,13 +588,15 @@ std::string PredefinedExpr::ComputeName(IdentType IT, const Decl *CurrentDecl) { // not a constructor or destructor. if ((isa<CXXMethodDecl>(FD) && cast<CXXMethodDecl>(FD)->getParent()->isLambda()) || - (FT && FT->getResultType()->getAs<AutoType>())) + (FT && FT->getReturnType()->getAs<AutoType>())) Proto = "auto " + Proto; - else if (FT && FT->getResultType()->getAs<DecltypeType>()) - FT->getResultType()->getAs<DecltypeType>()->getUnderlyingType() + else if (FT && FT->getReturnType()->getAs<DecltypeType>()) + FT->getReturnType() + ->getAs<DecltypeType>() + ->getUnderlyingType() .getAsStringInternal(Proto, Policy); else if (!isa<CXXConstructorDecl>(FD) && !isa<CXXDestructorDecl>(FD)) - AFT->getResultType().getAsStringInternal(Proto, Policy); + AFT->getReturnType().getAsStringInternal(Proto, Policy); Out << Proto; @@ -1225,7 +1227,7 @@ QualType CallExpr::getCallReturnType() const { CalleeType = Expr::findBoundMemberType(getCallee()); const FunctionType *FnType = CalleeType->castAs<FunctionType>(); - return FnType->getResultType(); + return FnType->getReturnType(); } SourceLocation CallExpr::getLocStart() const { |