]> granicus.if.org Git - clang/commit
[analyzer] BlockCall shouldn't really be an AnyFunctionCall.
authorJordan Rose <jordan_rose@apple.com>
Wed, 15 Jan 2014 17:25:15 +0000 (17:25 +0000)
committerJordan Rose <jordan_rose@apple.com>
Wed, 15 Jan 2014 17:25:15 +0000 (17:25 +0000)
commit2ff5a1edc04d447e0360c4e4ce92e0803c6b0e3a
tree62bb72c2aec3eeedf864ef96b9401a3d05c8b0af
parenta966b85e0fb4d37e12252bbb7edf897c5b5404ad
[analyzer] BlockCall shouldn't really be an AnyFunctionCall.

Per discussion with Anna a /long/ time ago, it was way too easy to misuse
BlockCall: because it inherited from AnyFunctionCall (through SimpleCall),
getDecl() was constrained to return a FunctionDecl, and you had to call
getBlockDecl() instead. This goes against the whole point of CallEvent
(to abstract over different ways to invoke bodies of code).

Now, BlockCall just inherits directly from CallEvent. There's a bit of
duplication in getting things out of the origin expression (which is still
known to be a CallExpr), but nothing significant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199321 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/Checkers/MallocChecker.cpp
lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
lib/StaticAnalyzer/Core/CallEvent.cpp