diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-08-03 23:08:49 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-08-03 23:08:49 +0000 |
commit | 9da59a67a27a4d3fc9d59552f07808a32f85e9d3 (patch) | |
tree | 4be5d7b80e8b3e2a8e435b4e80b5a56682947c28 /lib/StaticAnalyzer/Core/CallEvent.cpp | |
parent | 7ad4848d4744b8d60289f3e359250cebdaaf7114 (diff) |
[analyzer] Track null/uninitialized C++ objects used in method calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161278 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/CallEvent.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/CallEvent.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/StaticAnalyzer/Core/CallEvent.cpp b/lib/StaticAnalyzer/Core/CallEvent.cpp index fb00a226a2..05147670c1 100644 --- a/lib/StaticAnalyzer/Core/CallEvent.cpp +++ b/lib/StaticAnalyzer/Core/CallEvent.cpp @@ -419,21 +419,13 @@ void CXXInstanceCall::getInitialStackFrameContents( -SVal CXXMemberCall::getCXXThisVal() const { - const Expr *Base = getOriginExpr()->getImplicitObjectArgument(); - - // FIXME: Will eventually need to cope with member pointers. This is - // a limitation in getImplicitObjectArgument(). - if (!Base) - return UnknownVal(); - - return getSVal(Base); +const Expr *CXXMemberCall::getCXXThisExpr() const { + return getOriginExpr()->getImplicitObjectArgument(); } -SVal CXXMemberOperatorCall::getCXXThisVal() const { - const Expr *Base = getOriginExpr()->getArg(0); - return getSVal(Base); +const Expr *CXXMemberOperatorCall::getCXXThisExpr() const { + return getOriginExpr()->getArg(0); } |