diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h | 1 | ||||
-rw-r--r-- | include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h | 15 |
2 files changed, 12 insertions, 4 deletions
diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h index 7e665ceda5..3e62a920b7 100644 --- a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h +++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h @@ -232,7 +232,6 @@ BugReporterVisitor *getTrackNullOrUndefValueVisitor(const ExplodedNode *N, const Stmt *GetDerefExpr(const ExplodedNode *N); const Stmt *GetDenomExpr(const ExplodedNode *N); -const Stmt *GetCalleeExpr(const ExplodedNode *N); const Stmt *GetRetValExpr(const ExplodedNode *N); } // end namespace clang diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h index 8e50833a3e..0843baa089 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h @@ -420,8 +420,17 @@ protected: CXXInstanceCall(const CXXInstanceCall &Other) : SimpleCall(Other) {} public: + /// \brief Returns the expression representing the implicit 'this' object. + virtual const Expr *getCXXThisExpr() const = 0; + /// \brief Returns the value of the implicit 'this' object. - virtual SVal getCXXThisVal() const = 0; + SVal getCXXThisVal() const { + const Expr *Base = getCXXThisExpr(); + // FIXME: This doesn't handle an overloaded ->* operator. + if (!Base) + return UnknownVal(); + return getSVal(Base); + } virtual const Decl *getRuntimeDefinition() const; @@ -453,7 +462,7 @@ public: return cast<CXXMemberCallExpr>(SimpleCall::getOriginExpr()); } - virtual SVal getCXXThisVal() const; + virtual const Expr *getCXXThisExpr() const; virtual Kind getKind() const { return CE_CXXMember; } @@ -492,7 +501,7 @@ public: return getOriginExpr()->getArg(Index + 1); } - virtual SVal getCXXThisVal() const; + virtual const Expr *getCXXThisExpr() const; virtual Kind getKind() const { return CE_CXXMemberOperator; } |