summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/Environment.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-01-11 01:06:27 +0000
committerTed Kremenek <kremenek@apple.com>2012-01-11 01:06:27 +0000
commit3f406ba4bf6090d26bf59e20c9536e81bc9e01b6 (patch)
tree3d4af77fccd0ac6e3e50175504448e09a529389a /clang/lib/StaticAnalyzer/Core/Environment.cpp
parentf4fb2c5ac8af14b72836a94c23fb930cdf1cf409 (diff)
downloadbcm5719-llvm-3f406ba4bf6090d26bf59e20c9536e81bc9e01b6.tar.gz
bcm5719-llvm-3f406ba4bf6090d26bf59e20c9536e81bc9e01b6.zip
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. llvm-svn: 147904
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/Environment.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/Environment.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/Environment.cpp b/clang/lib/StaticAnalyzer/Core/Environment.cpp
index f43c2adc649..691530bdcb2 100644
--- a/clang/lib/StaticAnalyzer/Core/Environment.cpp
+++ b/clang/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:
OpenPOWER on IntegriCloud