]> granicus.if.org Git - clang/commit
[analyzer] Reduce code duplication: make CXXDestructorCall a CXXInstanceCall.
authorJordan Rose <jordan_rose@apple.com>
Mon, 13 Aug 2012 23:46:05 +0000 (23:46 +0000)
committerJordan Rose <jordan_rose@apple.com>
Mon, 13 Aug 2012 23:46:05 +0000 (23:46 +0000)
commit645baeed6800f952e9ad1d5666e01080385531a2
tree2752f7c6f2e3ffd85616837dcb309510ec3c788b
parent8ec104b9fffb917924c495ce3dd25694e4e3087a
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161809 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/CheckerManager.h
include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
lib/StaticAnalyzer/Core/CallEvent.cpp
lib/StaticAnalyzer/Core/CheckerManager.cpp
lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp