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/StaticAnalyzer/Core/CallEvent.cpp | |
| parent | 1c42a7d28ea54606d2edde52789b4b55bb27a561 (diff) | |
| download | clang-37545f747c61382bbf5291d28a47fef6fc4d2d0e.tar.gz clang-37545f747c61382bbf5291d28a47fef6fc4d2d0e.tar.bz2 clang-37545f747c61382bbf5291d28a47fef6fc4d2d0e.tar.xz | |
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/StaticAnalyzer/Core/CallEvent.cpp')
| -rw-r--r-- | lib/StaticAnalyzer/Core/CallEvent.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Core/CallEvent.cpp b/lib/StaticAnalyzer/Core/CallEvent.cpp index d72678e2e4..121e35fa7d 100644 --- a/lib/StaticAnalyzer/Core/CallEvent.cpp +++ b/lib/StaticAnalyzer/Core/CallEvent.cpp @@ -239,9 +239,9 @@ bool CallEvent::isCallStmt(const Stmt *S) { QualType CallEvent::getDeclaredResultType(const Decl *D) { assert(D); if (const FunctionDecl* FD = dyn_cast<FunctionDecl>(D)) - return FD->getResultType(); + return FD->getReturnType(); if (const ObjCMethodDecl* MD = dyn_cast<ObjCMethodDecl>(D)) - return MD->getResultType(); + return MD->getReturnType(); if (const BlockDecl *BD = dyn_cast<BlockDecl>(D)) { // Blocks are difficult because the return type may not be stored in the // BlockDecl itself. The AST should probably be enhanced, but for now we @@ -254,7 +254,7 @@ QualType CallEvent::getDeclaredResultType(const Decl *D) { if (const TypeSourceInfo *TSI = BD->getSignatureAsWritten()) { QualType Ty = TSI->getType(); if (const FunctionType *FT = Ty->getAs<FunctionType>()) - Ty = FT->getResultType(); + Ty = FT->getReturnType(); if (!Ty->isDependentType()) return Ty; } |
