diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-01-11 01:06:27 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-01-11 01:06:27 +0000 |
commit | 256ef642f8feef22fd53be7efa868e8e34752eed (patch) | |
tree | 2284c2e8152c2cd1052fd4938b76e10e10078fb4 /lib/StaticAnalyzer/Core/Environment.cpp | |
parent | 806054db6653d29cb0d9692df3612cbcd03d0530 (diff) |
Remove '#if 0' from ExprEngine::InlineCall(), and start fresh by wiring up inlining for straight C calls.
My hope is to reimplement this from first principles based on the simplifications of removing unneeded node builders
and re-evaluating how C++ calls are handled in the CFG. The hope is to turn inlining "on-by-default" as soon as possible
with a core set of things working well, and then expand over time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/Environment.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/Environment.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Core/Environment.cpp b/lib/StaticAnalyzer/Core/Environment.cpp index f43c2adc64..691530bdcb 100644 --- a/lib/StaticAnalyzer/Core/Environment.cpp +++ b/lib/StaticAnalyzer/Core/Environment.cpp @@ -90,6 +90,14 @@ SVal Environment::getSVal(const EnvironmentEntry &Entry, continue; case Stmt::ObjCPropertyRefExprClass: return loc::ObjCPropRef(cast<ObjCPropertyRefExpr>(E)); + case Stmt::ReturnStmtClass: { + const ReturnStmt *RS = cast<ReturnStmt>(E); + if (const Expr *RE = RS->getRetValue()) { + E = RE; + continue; + } + return UndefinedVal(); + } // Handle all other Stmt* using a lookup. default: |