From: Jordan Rose Date: Tue, 17 Jul 2012 17:27:10 +0000 (+0000) Subject: [analyzer] Remove stale result type lvalue code. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6a1abac4701a3d08dc61070acd46b6a19be95ea;p=clang [analyzer] Remove stale result type lvalue code. This code has been moved around multiple times, but seems to have been obsolete ever since we started handled references like pointers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160375 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Core/Calls.cpp b/lib/StaticAnalyzer/Core/Calls.cpp index cf4d188e43..4ab6b45675 100644 --- a/lib/StaticAnalyzer/Core/Calls.cpp +++ b/lib/StaticAnalyzer/Core/Calls.cpp @@ -38,16 +38,8 @@ SourceRange CallEvent::getArgSourceRange(unsigned Index) const { QualType CallEvent::getResultType() const { QualType ResultTy = getDeclaredResultType(); - if (const Expr *E = getOriginExpr()) { - if (ResultTy.isNull()) - ResultTy = E->getType(); - - // FIXME: This is copied from CallOrObjCMessage, but it seems suspicious. - if (E->isGLValue()) { - ASTContext &Ctx = State->getStateManager().getContext(); - ResultTy = Ctx.getPointerType(ResultTy); - } - } + if (ResultTy.isNull()) + ResultTy = getOriginExpr()->getType(); return ResultTy; }