diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-08-13 23:46:05 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-08-13 23:46:05 +0000 |
commit | ce6c99a559821f6073b1a990f91510cf57ebdaad (patch) | |
tree | 86343a8c7e43764d267703fc0a334735fdff6032 /clang/lib/StaticAnalyzer/Core/CheckerManager.cpp | |
parent | 710f6b1259fb9f13cfa34b3d093d6130b0fb8b3a (diff) | |
download | bcm5719-llvm-ce6c99a559821f6073b1a990f91510cf57ebdaad.tar.gz bcm5719-llvm-ce6c99a559821f6073b1a990f91510cf57ebdaad.zip |
[analyzer] Reduce code duplication: make CXXDestructorCall a CXXInstanceCall.
While there is now some duplication between SimpleCall and the CXXInstanceCall
sub-hierarchy, this is much better than copy-and-pasting the devirtualization
logic shared by both instance methods and destructors.
An unfortunate side effect is that there is no longer a single CallEvent type
that corresponds to "calls written as CallExprs". For the most part this is a
good thing, but the checker callback eval::Call still takes a CallExpr rather
than a CallEvent (since we're not sure if we want to allow checkers to
evaluate other kinds of calls). A mistake here will be caught by a cast<> in
CheckerManager::runCheckersForEvalCall.
No functionality change.
llvm-svn: 161809
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/CheckerManager.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/CheckerManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp b/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp index 564404e5653..c7866559c6d 100644 --- a/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp +++ b/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp @@ -504,9 +504,9 @@ CheckerManager::runCheckersForEvalAssume(ProgramStateRef state, /// Only one checker will evaluate the call. void CheckerManager::runCheckersForEvalCall(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, - const SimpleCall &Call, + const CallEvent &Call, ExprEngine &Eng) { - const CallExpr *CE = Call.getOriginExpr(); + const CallExpr *CE = cast<CallExpr>(Call.getOriginExpr()); for (ExplodedNodeSet::iterator NI = Src.begin(), NE = Src.end(); NI != NE; ++NI) { |